From d52e170500d1f532b8c45fcf5947d4d1e805febb Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 26 Apr 2020 09:22:50 +0200 Subject: Inconsistent behavior between `///` and `//!` for formulas (#7726) When we have code like: ``` //! //! \f$a \times //! c \f$ //! ``` this will throw a warning like: ``` warning: End of comment block while inside formula. ``` due to the fact that after the comment conversion the code is like: ``` /** * \f$a \times //! c \f$ * */ ``` Comparing to the `///` comments: ``` /// /// \f$a \times /// c \f$ /// ``` we get ``` /** * \f$a \times c \f$ * */ ``` This discrepancy has been removed. --- src/commentcnv.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commentcnv.l b/src/commentcnv.l index 59d1a8b..63ecaaf 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -488,7 +488,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z \n { /* new line in verbatim block */ copyToOutput(yyscanner,yytext,(int)yyleng); } -^[ \t]*"///" { +^[ \t]*"//"[/!] { if (yyextra->blockName=="dot" || yyextra->blockName=="msc" || yyextra->blockName=="uml" || yyextra->blockName.at(0)=='f') { // see bug 487871, strip /// from dot images and formulas. -- cgit v0.12