summaryrefslogtreecommitdiffstats
path: root/src/commentcnv.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-02-08 16:10:45 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-02-08 16:10:45 (GMT)
commit137328681e7dcbd07a5ec0e4b068aea96ec41b4a (patch)
tree4f87c661d918fda681e0f1854376d6e9540511c4 /src/commentcnv.l
parent93245ad926ce01720eb35b9cf000992a44ac85c0 (diff)
downloadDoxygen-137328681e7dcbd07a5ec0e4b068aea96ec41b4a.zip
Doxygen-137328681e7dcbd07a5ec0e4b068aea96ec41b4a.tar.gz
Doxygen-137328681e7dcbd07a5ec0e4b068aea96ec41b4a.tar.bz2
issue #7570 Comments replaced by block comments inside Markdown code block
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r--src/commentcnv.l12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index f3367a4..ba2e5ec 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -546,7 +546,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
}
}
<CComment>\n { /* new line in comment */
- copyToOutput(yyscanner,yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
/* in case of Fortran always end of comment */
if (yyextra->lang==SrcLangExt_Fortran)
{
@@ -554,16 +554,20 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
}
}
<CComment>"/"+"*" { /* nested C comment */
- if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl))
+ if (yyextra->lang==SrcLangExt_Python ||
+ yyextra->lang==SrcLangExt_Tcl ||
+ yyextra->lang==SrcLangExt_Markdown)
{
REJECT;
}
yyextra->nestingCount++;
yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
- copyToOutput(yyscanner,yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"*"+"/" { /* end of C comment */
- if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl))
+ if (yyextra->lang==SrcLangExt_Python ||
+ yyextra->lang==SrcLangExt_Tcl ||
+ yyextra->lang==SrcLangExt_Markdown)
{
REJECT;
}