summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-07-29 07:29:58 (GMT)
committerGitHub <noreply@github.com>2019-07-29 07:29:58 (GMT)
commita1ac854ad0ad3bbbc42988c50bf143ba23cb2107 (patch)
treea0e25d950e2821a474e056678d97b0962c83ecce /src/commentscan.l
parent431bb2e97af27dbb79ffc2bee61f1d60f11304ac (diff)
parent36747c438c1004e3d17282fec7c05c9feac6db97 (diff)
downloadDoxygen-a1ac854ad0ad3bbbc42988c50bf143ba23cb2107.zip
Doxygen-a1ac854ad0ad3bbbc42988c50bf143ba23cb2107.tar.gz
Doxygen-a1ac854ad0ad3bbbc42988c50bf143ba23cb2107.tar.bz2
Merge pull request #7026 from albert-github/feature/bug_end_comment_code_section
End comment marker in \code section.
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index d2e51e4..b283a8b 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1890,17 +1890,20 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput('\n');
}
<FormatBlock>"/*" { // start of a C-comment
- g_commentCount++;
+ if (!(blockName=="code" || blockName=="verbatim")) g_commentCount++;
addOutput(yytext);
}
<FormatBlock>"*/" { // end of a C-comment
addOutput(yytext);
- g_commentCount--;
- if (g_commentCount<0 && blockName!="verbatim")
- {
- warn(yyFileName,yyLineNr,
+ if (!(blockName=="code" || blockName=="verbatim"))
+ {
+ g_commentCount--;
+ if (g_commentCount<0)
+ {
+ warn(yyFileName,yyLineNr,
"found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data());
- }
+ }
+ }
}
<FormatBlock>. {
addOutput(*yytext);