]> git.lyx.org Git - lyx.git/blobdiff - src/Lexer.cpp
Forgotten tex2lyx change in dbe0096c126f9
[lyx.git] / src / Lexer.cpp
index c4b738f119bcf13fe903d8a74df6e53e1514bc28..fa9ffc71e8155040ff9c0b01dd802eee3f520a3d 100644 (file)
@@ -695,23 +695,23 @@ double Lexer::getFloat() const
 }
 
 
-string const Lexer::getString() const
+string const Lexer::getString(bool trim) const
 {
        lastReadOk_ = pimpl_->status == LEX_DATA || pimpl_->status == LEX_TOKEN;
 
        if (lastReadOk_)
-       return pimpl_->getString();
+               return trim ? support::trim(pimpl_->getString(), "\t ") : pimpl_->getString();
 
        return string();
 }
 
 
-docstring const Lexer::getDocString() const
+docstring const Lexer::getDocString(bool trim) const
 {
        lastReadOk_ = pimpl_->status == LEX_DATA || pimpl_->status == LEX_TOKEN;
 
        if (lastReadOk_)
-               return pimpl_->getDocString();
+               return trim ? support::trim(pimpl_->getDocString(), "\t ") : pimpl_->getDocString();
 
        return docstring();
 }