From 36731bc9b573cdee6d699d0f66b4b34ad5b8f9ac Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 5 Jun 2016 10:00:25 +0200 Subject: [PATCH] Bug 767171 - ALIASES stop working after verbatim with formula and /** */ 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. --- src/commentcnv.l | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commentcnv.l b/src/commentcnv.l index 169f66a7b3d..6409b0b4680 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -465,7 +465,7 @@ void replaceComment(int offset); } BEGIN(VerbatimCode); } -[\\@]("f$"|"f["|"f{"[a-z]*) { +[\\@]("f$"|"f["|"f{") { copyToOutput(yytext,(int)yyleng); g_blockName=&yytext[1]; if (g_blockName.at(1)=='[') @@ -488,9 +488,9 @@ void replaceComment(int offset); . { /* any ather character */ copyToOutput(yytext,(int)yyleng); } -[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"docbookonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */ +[\\@]("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); }