diff options
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r-- | src/markdown.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index 930efd6..8da908c 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2070,11 +2070,15 @@ void Markdown::writeOneLineHeaderOrRuler(const char *data,int size) } else // nothing interesting -> just output the line { - m_out.addStr(data,size); + int tmpSize = size; + if (data[size-1] == '\n') tmpSize--; + m_out.addStr(data,tmpSize); + if (hasLineBreak(data,size)) { - m_out.addStr("<br>\n"); + m_out.addStr("<br>"); } + if (tmpSize != size) m_out.addChar('\n'); } } |