MarkupParser: Fixed issue with last paragraph...

... when the last char of the markup is \n, it shall yield one last
paragraph that is empty (doesn't contain the \n which is still part
of the preceding paragraph).
This commit is contained in:
Stephan Aßmus
2014-01-26 11:16:37 +01:00
parent e9d9561cfb
commit 66b61b4784
@@ -157,7 +157,7 @@ MarkupParser::_ParseText(const BString& text)
case '\n':
_CopySpan(text, start, offset);
if (offset > 0 && c[-1] != ' ')
_FinishParagraph(offset >= charCount - 1);
_FinishParagraph(offset >= charCount);
start = offset + 1;
break;
@@ -212,7 +212,7 @@ MarkupParser::_ParseText(const BString& text)
offset += 2;
c += 2;
_FinishParagraph(offset >= charCount - 1);
_FinishParagraph(offset >= charCount);
start = offset + 1;
}