diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-10-20 14:26:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 14:26:53 (GMT) |
commit | 33341fe5fb8048411acea0276219a69be06fe02d (patch) | |
tree | 377092b5cb6018ea33019b3e0f3f34563b15c5ac | |
parent | 8eb8e0b77cc50b02a7cb17abb1e4c9b7c1b0d60a (diff) | |
parent | b035a11197f69770db5c7ebfb50cb42afc22468d (diff) | |
download | Doxygen-33341fe5fb8048411acea0276219a69be06fe02d.zip Doxygen-33341fe5fb8048411acea0276219a69be06fe02d.tar.gz Doxygen-33341fe5fb8048411acea0276219a69be06fe02d.tar.bz2 |
Merge pull request #8114 from albert-github/feature/bug_cnt_md_extra_line
Miscounting in case of markdown wanted newline due to spaces at end of line
-rw-r--r-- | src/markdown.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index e395fd9..7f6dc9b 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2068,13 +2068,17 @@ void Markdown::writeOneLineHeaderOrRuler(const char *data,int size) m_out.addStr("</"+hTag+">\n"); } } - else // nothing interesting -> just output the line + else if (size>0) // 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'); } } |