diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-01-31 19:17:19 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-01-31 19:17:19 (GMT) |
commit | 3ab46ac8d7e6607ddca40efbe3fff95ae79eeee8 (patch) | |
tree | 3834904196f984f69f489564deca6ce09f33e964 /src | |
parent | c141d67332ce9e6875d4c03c4652a88da29a6f78 (diff) | |
parent | b590c8dbd9d50d972c656bfe62a3fe52a4f5394f (diff) | |
download | Doxygen-3ab46ac8d7e6607ddca40efbe3fff95ae79eeee8.zip Doxygen-3ab46ac8d7e6607ddca40efbe3fff95ae79eeee8.tar.gz Doxygen-3ab46ac8d7e6607ddca40efbe3fff95ae79eeee8.tar.bz2 |
Merge branch 'feature/issue_6800' of https://github.com/albert-github/doxygen into albert-github-feature/issue_6800
Diffstat (limited to 'src')
-rw-r--r-- | src/markdown.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index fcad7e9..1b13e5c 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1886,10 +1886,12 @@ 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 empty, i.e. only spaces or tabs, line is */ + while (i<size && data[i]!='\n') {if (data[i] != ' ' && data[i] != '\t') j++;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 && data[i-1]==' ' && data[i-2]==' '); } @@ -1947,7 +1949,7 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size) out.addStr(data,size); if (hasLineBreak(data,size)) { - out.addStr("\n"); + out.addStr("<br>"); } } } |