Skip to content

Commit

Permalink
issue #7807 Incorrect handling of triple backticks with specifying la…
Browse files Browse the repository at this point in the history
…nguage.

Regression when having e.g.
~~~
`<pre>`
~~~
we got problem (block not properly recognized.
Previous fix was to rigorous, should have explicit language possibilities.
  • Loading branch information
albert-github committed Nov 23, 2021
1 parent 48888bf commit a7d4030
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/scanner.l
Expand Up @@ -6604,7 +6604,9 @@ NONLopt [^\n]*
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
QCString pat = substitute(yytext,"*"," ");
yyextra->docBlock << pat;
yyextra->docBlockName="```";
Expand All @@ -6625,7 +6627,7 @@ NONLopt [^\n]*
REJECT;
}
}
<DocBlock>[^@*~`\/\\\n]+ { // any character that isn't special
<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
yyextra->docBlock << yytext;
}
<DocBlock>\n { // newline
Expand Down

0 comments on commit a7d4030

Please sign in to comment.