summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-09-16 18:35:20 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-09-16 18:35:20 (GMT)
commitf0319f91cfee444d47c2abb4b15537d628d36249 (patch)
tree1f0161e1bb531a34f54a3e876db2011afa41112d /src
parentae4608f5dfadc7c43e047fc5ffb13598c2b3094a (diff)
parent9481a8844e5412295dd232e44a04ff8bcf169b5a (diff)
downloadDoxygen-f0319f91cfee444d47c2abb4b15537d628d36249.zip
Doxygen-f0319f91cfee444d47c2abb4b15537d628d36249.tar.gz
Doxygen-f0319f91cfee444d47c2abb4b15537d628d36249.tar.bz2
Merge branch 'feature/bug_html_comment' of https://github.com/albert-github/doxygen into albert-github-feature/bug_html_comment
Diffstat (limited to 'src')
-rw-r--r--src/markdown.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 6fea0a6..48f3dbc 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -480,7 +480,8 @@ static int processNmdash(GrowBuf &out,const char *data,int off,int size)
{
count++;
}
- if (count==2 && off>=2 && qstrncmp(data-2,"<!",2)==0) return 0; // start HTML comment
+ if ((count==2 || count==3)&& off>=2 && qstrncmp(data-2,"<!",2)==0) return 2-count; // start HTML comment
+ if (count>=4 && off>=2 && qstrncmp(data-2,"<!",2)==0) return -1; // start HTML comment
if (count==2 && (data[2]=='>')) return 0; // end HTML comment
if (count==2 && (off<8 || qstrncmp(data-8,"operator",8)!=0)) // -- => ndash
{
@@ -1088,6 +1089,10 @@ static void processInline(GrowBuf &out,const char *data,int size)
{
end=i+1;
}
+ else if (end < 0)
+ {
+ end=i-end+1;
+ }
else
{
i+=end;