diff options
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/scanner.l b/src/scanner.l index 187a9ff..00ba8a7 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -4274,7 +4274,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) unput(yyextra->lastCopyArgChar); BEGIN( yyextra->lastCommentInArgContext ); } -<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) +<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) yyextra->docBlockName=&yytext[1]; yyextra->fullArgString+=yytext; BEGIN(CopyArgVerbatim); @@ -4292,7 +4292,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->fullArgString+=yytext; BEGIN(CopyArgVerbatim); } -<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9\-] { // end of verbatim block +<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9\-] { // end of verbatim block yyextra->fullArgString+=yytext; if (yytext[1]=='f') // end of formula { @@ -4914,7 +4914,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } <SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" { lineCount(yyscanner); - if ( yyextra->curlyCount ) + if ( yyextra->curlyCount ) { //addToBody(yytext); --yyextra->curlyCount ; @@ -4922,10 +4922,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) else { yyextra->current->endBodyLine=yyextra->yyLineNr; - // take yyextra->previous out of yyextra->current_root and move it into yyextra->current - yyextra->tempEntry = yyextra->current; // remember yyextra->current - yyextra->current_root->moveFromSubEntry(yyextra->previous.get(),yyextra->current); - yyextra->previous.reset(); + yyextra->tempEntry = yyextra->current; // temporarily switch to the previous entry + yyextra->current = yyextra->previous; yyextra->docBlockContext = SkipCurlyEndDoc; yyextra->docBlockInBody = FALSE; @@ -6254,7 +6252,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->nestedComment=FALSE; BEGIN(DocCopyBlock); } -<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) +<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) yyextra->docBlock+=yytext; yyextra->docBlockName=&yytext[1]; yyextra->fencedSize=0; @@ -6322,7 +6320,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->docBlock+=yytext; BEGIN(DocBlock); } -<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block +<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block yyextra->docBlock+=yytext; if (&yytext[4]==yyextra->docBlockName) { |