diff options
-rw-r--r-- | src/doctokenizer.l | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 0b7e36d..c0c6789 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -1008,6 +1008,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = yytext; return TK_SYMBOL; } +<St_TitleQ>(\n|"\\ilinebr") { /* new line => end of title */ + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); + return 0; + } <St_TitleQ>{SPCMD1} | <St_TitleQ>{SPCMD2} { /* special command */ g_token->name = yytext+1; @@ -1027,10 +1031,6 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} BEGIN(St_TitleA); return 0; } -<St_TitleQ>(\n|"\\ilinebr") { /* new line => end of title */ - for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); - return 0; - } <St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* { // title attribute g_token->name = yytext; g_token->name = g_token->name.left(g_token->name.find('=')).stripWhiteSpace(); @@ -1148,6 +1148,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = yytext; return TK_SYMBOL; } +<St_Ref2>"\""|\n|"\\ilinebr" { /* " or \n => end of title */ + return 0; + } <St_Ref2>{SPCMD1} | <St_Ref2>{SPCMD2} { /* special command */ g_token->name = yytext+1; @@ -1164,9 +1167,6 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->chars=yytext; return TK_WHITESPACE; } -<St_Ref2>"\""|\n|"\\ilinebr" { /* " or \n => end of title */ - return 0; - } <St_XRefItem>{LABELID} { g_token->name=yytext; } |