MarkupParser: Append \n to each paragraph.

This commit is contained in:
Stephan Aßmus 2014-01-22 00:09:55 +01:00
parent f944b405c4
commit 0e36794492

View File

@ -265,8 +265,7 @@ MarkupParser::_CopySpan(const BString& text, int32& start, int32 end)
BString subString;
text.CopyCharsInto(subString, start, end - start);
fCurrentParagraph.Append(TextSpan(subString,
*fCurrentCharacterStyle));
fCurrentParagraph.Append(TextSpan(subString, *fCurrentCharacterStyle));
start = end;
}
@ -285,6 +284,7 @@ MarkupParser::_ToggleStyle(const CharacterStyle& style)
void
MarkupParser::_FinishParagraph()
{
fCurrentParagraph.Append(TextSpan("\n", *fCurrentCharacterStyle));
fTextDocument->Append(fCurrentParagraph);
fCurrentParagraph.Clear();
fCurrentParagraph.SetStyle(fParagraphStyle);