diff options
author | albert-github <albert.tests@gmail.com> | 2020-10-26 14:59:30 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-10-26 14:59:30 (GMT) |
commit | 70abd648fd67d3588bc9d6e64f5eeaab575f515f (patch) | |
tree | 9a56f9d21f26aeafa19a791d1e938d162598f6ea /src/doctokenizer.l | |
parent | 49bd996c0e05df763632c346038a2346174f7382 (diff) | |
download | Doxygen-70abd648fd67d3588bc9d6e64f5eeaab575f515f.zip Doxygen-70abd648fd67d3588bc9d6e64f5eeaab575f515f.tar.gz Doxygen-70abd648fd67d3588bc9d6e64f5eeaab575f515f.tar.bz2 |
issue #8127 Java: xml output of preformatted (`<pre>`) block adds para-block for blank lines (hindering certain manual parsing)
Don't terminate a paragraph and remove the whitespace when inside a pre block, but output the blanks.
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r-- | src/doctokenizer.l | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 5b72b77..69f650d 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -811,18 +811,26 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio } <St_Para>({BLANK}*\n)+{BLANK}*\n{BLANK}* { lineCount(yytext,yyleng); - 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++) + if (g_insidePre) { - unput(' '); + g_token->chars=yytext; + return TK_WHITESPACE; + } + else + { + 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; } - // 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; |