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); }