Skip to content

Commit 6a86d20

Browse files
committed
Fixed case giving incorrect 'File ended in the middle of a comment block' warning
Test case: ```.c++ /// class class T { public: /// Some text /// \code{.cpp} /// int func() {} /// \endcode{.cpp} int func() {} }; ``` Cause is the extra `{.cpp}` after `\endcode` which is incorrect, but should not cause the rest of the code to be skipped.
1 parent fd23262 commit 6a86d20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commentcnv.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ SLASHopt [/]*
705705
BEGIN(yyextra->lastCommentContext);
706706
}
707707
}
708-
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc"|"enduml") { /* end of verbatim block */
708+
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc"|"enduml")/("{")? { /* end of verbatim block */
709709
copyToOutput(yyscanner,yytext,yyleng);
710710
if (&yytext[1]==yyextra->blockName)
711711
{

0 commit comments

Comments
 (0)