X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FLexer.cpp;h=fa9ffc71e8155040ff9c0b01dd802eee3f520a3d;hb=ee41b0f1930604e73f0525864cf3846e7459a449;hp=c4b738f119bcf13fe903d8a74df6e53e1514bc28;hpb=f5b829bc8abf2e777d8dfc93400ae603d26d3a22;p=lyx.git diff --git a/src/Lexer.cpp b/src/Lexer.cpp index c4b738f119..fa9ffc71e8 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -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(); }