diff options
author | albert-github <albert.tests@gmail.com> | 2020-04-25 10:54:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 10:54:07 (GMT) |
commit | 94556355036eee38b0403f059a8674408e7e4ea8 (patch) | |
tree | a2903b7126fa2f61d3d6aa04072d3cada3fa462d | |
parent | 0a40a4d251273f47773254f57ce049a25fa447e6 (diff) | |
download | Doxygen-94556355036eee38b0403f059a8674408e7e4ea8.zip Doxygen-94556355036eee38b0403f059a8674408e7e4ea8.tar.gz Doxygen-94556355036eee38b0403f059a8674408e7e4ea8.tar.bz2 |
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 `‍` will be properly filtered in the different output formats.
-rw-r--r-- | src/code.l | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1090,6 +1090,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" yyextra->parmType = yyextra->name; BEGIN(FuncCall); } +<Body>"\\)"|"\\(" { + yyextra->code->codify(yytext); + } <Body>[\\|\)\+\-\/\%\~\!] { yyextra->code->codify(yytext); yyextra->name.resize(0);yyextra->type.resize(0); |