summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-01-31 19:39:16 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-01-31 19:39:16 (GMT)
commitcc50cc2466d832c6b3018118450afa92dee4b03d (patch)
tree1098ab486c3a178a2b55c5fb338f31a9b00700bd /src/markdown.cpp
parent3ab46ac8d7e6607ddca40efbe3fff95ae79eeee8 (diff)
downloadDoxygen-cc50cc2466d832c6b3018118450afa92dee4b03d.zip
Doxygen-cc50cc2466d832c6b3018118450afa92dee4b03d.tar.gz
Doxygen-cc50cc2466d832c6b3018118450afa92dee4b03d.tar.bz2
Minor tweaks
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 1b13e5c..93a4c91 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1887,11 +1887,15 @@ static int hasLineBreak(const char *data,int size)
{
int i=0;
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++;}
+ // 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 (j && 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
}