Skip to content

Commit 9455635

Browse files
Undefined control sequence for formula using MathJax (#7712)
When having a code comment like: ``` @code sub postprocess { s/\(?\@Xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g; s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; } @Endcode ``` and using MathJax the `/(` is seen as a the beginning of a formula, but should be seen as text and can now lead to "Undefined control sequence". (The problem comes originally from code as generated by the doxygen-perl-filter for converting perl code in something doxygen does understand). This problem is similar to the problems solved in pull request #7697, but not handled here. This pull request will see `\(` (and its counter part `\)` as complete entities and replace them in a similar way as done in #7697 (but now in an earlier stage but the `&zwj;` will be properly filtered in the different output formats.
1 parent 0a40a4d commit 9455635

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/code.l

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
10901090
yyextra->parmType = yyextra->name;
10911091
BEGIN(FuncCall);
10921092
}
1093+
<Body>"\\)"|"\\(" {
1094+
yyextra->code->codify(yytext);
1095+
}
10931096
<Body>[\\|\)\+\-\/\%\~\!] {
10941097
yyextra->code->codify(yytext);
10951098
yyextra->name.resize(0);yyextra->type.resize(0);

0 commit comments

Comments
 (0)