Skip to content

Commit

Permalink
Inconsistent behavior between /// and //! for formulas (#7726)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
albert-github committed Apr 26, 2020
1 parent 869f979 commit d52e170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commentcnv.l
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
<Verbatim,VerbatimCode>\n { /* new line in verbatim block */
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Verbatim>^[ \t]*"///" {
<Verbatim>^[ \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.
Expand Down

0 comments on commit d52e170

Please sign in to comment.