Skip to content

Commit

Permalink
Bug 767171 - ALIASES stop working after verbatim with formula and /** */
Browse files Browse the repository at this point in the history
A formula should not not end a "verbatim" type of block. A  "verbatim" type of block should only stop at the corresponding end command.
In case of a formula with an environment (i.e. f{) the name of the environment can be parsed separately.

Corrected end condition for docbookonly.
  • Loading branch information
albert-github committed Jun 5, 2016
1 parent 64597bb commit 36731bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commentcnv.l
Expand Up @@ -465,7 +465,7 @@ void replaceComment(int offset);
}
BEGIN(VerbatimCode);
}
<CComment,ReadLine>[\\@]("f$"|"f["|"f{"[a-z]*) {
<CComment,ReadLine>[\\@]("f$"|"f["|"f{") {
copyToOutput(yytext,(int)yyleng);
g_blockName=&yytext[1];
if (g_blockName.at(1)=='[')
Expand All @@ -488,9 +488,9 @@ void replaceComment(int offset);
<Scan>. { /* any ather character */
copyToOutput(yytext,(int)yyleng);
}
<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"docbookonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */
<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */
copyToOutput(yytext,(int)yyleng);
if (yytext[1]=='f') // end of formula
if (&yytext[1]==g_blockName) // end of formula
{
BEGIN(g_lastCommentContext);
}
Expand Down

0 comments on commit 36731bc

Please sign in to comment.