http://bugzilla.lyx.org/show_bug.cgi?id=5374
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26983
a592a061-630c-0410-9148-
cb99ea01b6c8
docstring selection(size_t sel_index)
{
return sel_index < theCuts.size()
- ? theCuts[sel_index].first.back().asString(AS_STR_INSETS)
+ ? theCuts[sel_index].first.back().asString(AS_STR_INSETS | AS_STR_NEWLINES)
: docstring();
}
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);
{
AS_STR_NONE = 0, ///< No option, only printable characters.
AS_STR_LABEL = 1, ///< Prefix with paragraph label.
- AS_STR_INSETS = 2 ///< Go into insets.
+ AS_STR_INSETS = 2, ///< Go into insets.
+ AS_STR_NEWLINES = 4 ///< Get also newline characters.
};