]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Fix bug 5374
[lyx.git] / src / Paragraph.cpp
index e46faab4b922848e6487ea7077d4ab64f138aa4b..1bfec20211c7b94bbaf6f4cfa668c353fb96c8cb 100644 (file)
@@ -2422,7 +2422,8 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options) const
 
        for (pos_type i = beg; i < end; ++i) {
                char_type const c = d->text_[i];
-               if (isPrintable(c) || c == '\t')
+               if (isPrintable(c) || c == '\t'
+                   || (c == '\n' && options & AS_STR_NEWLINES))
                        os.put(c);
                else if (c == META_INSET && options & AS_STR_INSETS)
                        getInset(i)->textString(os);