diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-01-31 19:39:33 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-01-31 19:39:33 (GMT) |
commit | 4904f70fa7a412487e3c878f156591b230e76e26 (patch) | |
tree | 1098ab486c3a178a2b55c5fb338f31a9b00700bd | |
parent | c141d67332ce9e6875d4c03c4652a88da29a6f78 (diff) | |
parent | cc50cc2466d832c6b3018118450afa92dee4b03d (diff) | |
download | Doxygen-4904f70fa7a412487e3c878f156591b230e76e26.zip Doxygen-4904f70fa7a412487e3c878f156591b230e76e26.tar.gz Doxygen-4904f70fa7a412487e3c878f156591b230e76e26.tar.bz2 |
Merge branch 'albert-github-feature/issue_6800'
-rw-r--r-- | src/markdown.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index fcad7e9..93a4c91 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1886,10 +1886,16 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size) static int hasLineBreak(const char *data,int size) { int i=0; - while (i<size && data[i]!='\n') i++; + int j=0; + // search for end of line and also check if it is not a completely blank + while (i<size && data[i]!='\n') + { + if (data[i]!=' ' && data[i]!='\t') j++; // some non whitespace + i++; + } if (i>=size) return 0; // empty line if (i<2) return 0; // not long enough - return (data[i-1]==' ' && data[i-2]==' '); + return (j>0 && data[i-1]==' ' && data[i-2]==' '); // non blank line with at two spaces at the end } @@ -1947,7 +1953,7 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size) out.addStr(data,size); if (hasLineBreak(data,size)) { - out.addStr("\n"); + out.addStr("<br>"); } } } |