diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-05-19 12:23:25 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-05-19 12:23:25 (GMT) |
commit | 79099187058387c3d77bc33f46f02ee2315ef83d (patch) | |
tree | 83a30b06a24a934bb4120199cd0c180ece6fc1ed /src/doctokenizer.l | |
parent | 8dc4ff6dd22b1603f33537ff03994cc63e658768 (diff) | |
download | Doxygen-79099187058387c3d77bc33f46f02ee2315ef83d.zip Doxygen-79099187058387c3d77bc33f46f02ee2315ef83d.tar.gz Doxygen-79099187058387c3d77bc33f46f02ee2315ef83d.tar.bz2 |
Release-1.8.4
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r-- | src/doctokenizer.l | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l index c884976..cdf2933 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -338,7 +338,7 @@ ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'">< URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=] URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+ FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+@&#] -FILEECHAR [a-z_A-Z0-9\-\+] +FILEECHAR [a-z_A-Z0-9\-\+@&#] HFILEMASK ("."{FILESCHAR}*{FILEECHAR}+)* FILEMASK ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|{HFILEMASK} LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)? @@ -690,34 +690,37 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} g_token->name = yytext; return TK_COMMAND; } +<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} { /* skip trailing paragraph followed by new list item */ + if (g_insidePre) + { + REJECT; + } + } +<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} { /* skip trailing paragraph followed by new list item */ + if (!Doxygen::markdownSupport || g_insidePre) + { + REJECT; + } + } +<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} { /* skip trailing paragraph followed by new list item */ + if (!Doxygen::markdownSupport || g_insidePre) + { + REJECT; + } + } <St_Para>({BLANK}*\n)+{BLANK}*\n{BLANK}* { - // g_insidePre was always FALSE, so the next section - // was never executed, now g_insidePre is set properly - // again, so the section is commented out to keep the - // old behavior. - //if (g_insidePre) - //{ - // /* Inside a <pre>..</pre> blank lines are treated - // * as whitespace. - // */ - // g_token->chars=yytext; - // return TK_WHITESPACE; - //} - //else // found end of a paragraph - { - g_token->indent=computeIndent(yytext,(int)yyleng); - int i; - // put back the indentation (needed for list items) - for (i=0;i<g_token->indent;i++) - { - unput(' '); - } - // tell flex that after putting the last indent - // back we are at the beginning of the line - YY_CURRENT_BUFFER->yy_at_bol=1; - // start of a new paragraph - return TK_NEWPARA; - } + g_token->indent=computeIndent(yytext,(int)yyleng); + int i; + // put back the indentation (needed for list items) + for (i=0;i<g_token->indent;i++) + { + unput(' '); + } + // tell flex that after putting the last indent + // back we are at the beginning of the line + YY_CURRENT_BUFFER->yy_at_bol=1; + // start of a new paragraph + return TK_NEWPARA; } <St_CodeOpt>{BLANK}*"{"(".")?{LABELID}"}" { g_token->name = yytext; |