You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<CComment,ReadLine,IncludeFile>"<!--!" { /* HTML comment doxygen command*/
@@ -649,13 +672,15 @@ SLASHopt [/]*
649
672
yyextra->blockName="-->";
650
673
yyextra->lastCommentContext = YY_START;
651
674
yyextra->inVerbatim=true;
675
+
yyextra->verbatimLine=yyextra->lineNr;
652
676
BEGIN(Verbatim);
653
677
}
654
678
<CComment,ReadLine,IncludeFile>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly")/[^a-z_A-Z0-9] { /* start of a verbatim block */
655
679
copyToOutput(yyscanner,yytext,yyleng);
656
680
yyextra->blockName=QCString("end")+&yytext[1];
657
681
yyextra->lastCommentContext = YY_START;
658
682
yyextra->inVerbatim=true;
683
+
yyextra->verbatimLine=yyextra->lineNr;
659
684
BEGIN(Verbatim);
660
685
}
661
686
<Scan>"\\\"" { /* escaped double quote */
@@ -715,8 +740,26 @@ SLASHopt [/]*
715
740
}
716
741
}
717
742
<VerbatimCode>("```"[`]*|"~~~"[~]*) { /* end of markdown code block */
743
+
if (yyextra->blockName=="`" || yyextra->blockName=="``") // ``` inside single quote block
744
+
{
745
+
// copy the end block marker
746
+
copyToOutput(yyscanner,yytext,yyleng);
747
+
yyextra->inVerbatim=false;
748
+
BEGIN(yyextra->lastCommentContext);
749
+
}
750
+
else
751
+
{
752
+
copyToOutput(yyscanner,yytext,yyleng);
753
+
if (yytext[0]==yyextra->blockName[0])
754
+
{
755
+
yyextra->inVerbatim=false;
756
+
BEGIN(yyextra->lastCommentContext);
757
+
}
758
+
}
759
+
}
760
+
<VerbatimCode>"`"{1,2} {
718
761
copyToOutput(yyscanner,yytext,yyleng);
719
-
if (yytext[0]==yyextra->blockName[0])
762
+
if (yytext==yyextra->blockName)
720
763
{
721
764
yyextra->inVerbatim=false;
722
765
BEGIN(yyextra->lastCommentContext);
@@ -756,6 +799,14 @@ SLASHopt [/]*
756
799
<Verbatim,VerbatimCode>[^`~@\/\-\\\n{}]* { /* any character not a backslash or new line or } */
757
800
copyToOutput(yyscanner,yytext,yyleng);
758
801
}
802
+
<Verbatim,VerbatimCode>[^`~@\/\-\\\n{}]+/\n { /* premature end of comment block */
803
+
if (yyextra->lastCommentContext==ReadLine)
804
+
{
805
+
yyextra->inVerbatim=false;
806
+
BEGIN(yyextra->lastCommentContext);
807
+
}
808
+
copyToOutput(yyscanner,yytext,yyleng);
809
+
}
759
810
<Verbatim,VerbatimCode>\n { /* new line in verbatim block */
760
811
copyToOutput(yyscanner,yytext,yyleng);
761
812
if (yyextra->lastCommentContext == IncludeFile)
@@ -842,10 +893,10 @@ SLASHopt [/]*
842
893
copyToOutput(yyscanner,yytext,yyleng);
843
894
}
844
895
845
-
<CComment,CNComment>[^ `~<\\!@*\n{\"'\/-]* { /* anything that is not a '*' or command */
896
+
<CComment,CNComment>[^ `~<\\!@*\n{\"'\/-`]* { /* anything that is not a '*' or command */
846
897
copyToOutput(yyscanner,yytext,yyleng);
847
898
}
848
-
<CComment,CNComment>^{B}*"*"+[^*\/<\\@\n{\"]* { /* stars without slashes */
899
+
<CComment,CNComment>^{B}*"*"+[^*\/<\\@\n{\"`]* { /* stars without slashes */
0 commit comments