From 66b61b47841c1ca466aca1ed57a441a7b21b2a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 26 Jan 2014 11:16:37 +0100 Subject: [PATCH] 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). --- src/apps/haiku-depot/textview/MarkupParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/haiku-depot/textview/MarkupParser.cpp b/src/apps/haiku-depot/textview/MarkupParser.cpp index 86e09d77ca..258025feb7 100644 --- a/src/apps/haiku-depot/textview/MarkupParser.cpp +++ b/src/apps/haiku-depot/textview/MarkupParser.cpp @@ -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; }