diff options
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r-- | src/commentcnv.l | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l index c18605d..f482d52 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -370,8 +370,8 @@ void replaceComment(int offset); BEGIN(CComment); } } -<CComment>[ \t]+"{@code" { - copyToOutput(" @code",6); +<CComment>"{@code"/[ \t\n] { + copyToOutput("@code",5); g_lastCommentContext = YY_START; g_javaBlock=1; g_blockName=&yytext[1]; @@ -426,6 +426,7 @@ void replaceComment(int offset); else { g_javaBlock++; + copyToOutput(yytext,yyleng); } } <VerbatimCode>"}" { @@ -441,6 +442,10 @@ void replaceComment(int offset); copyToOutput(" @endcode ",10); BEGIN(g_lastCommentContext); } + else + { + copyToOutput(yytext,yyleng); + } } } <VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc") { /* end of verbatim block */ @@ -492,7 +497,7 @@ void replaceComment(int offset); copyToOutput(yytext,yyleng); } -<CComment>[^\\!@*\n]* { /* anything that is not a '*' or command */ +<CComment>[^\\!@*\n{]* { /* anything that is not a '*' or command */ copyToOutput(yytext,yyleng); } <CComment>"*"+[^*/\\@\n]* { /* stars without slashes */ |