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:
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue