diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-02-10 18:38:13 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-02-10 18:38:13 (GMT) |
commit | 11de530ba769e4e2735a20a74262380d51f8772f (patch) | |
tree | 654e62c3ea86e579f0642040b094a844d4e5223c /src/doctokenizer.l | |
parent | c635cffd1d8bcf5bcbe90ce2c3c5fc3371e01a1c (diff) | |
download | Doxygen-11de530ba769e4e2735a20a74262380d51f8772f.zip Doxygen-11de530ba769e4e2735a20a74262380d51f8772f.tar.gz Doxygen-11de530ba769e4e2735a20a74262380d51f8772f.tar.bz2 |
Release-1.4.1-20050210
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r-- | src/doctokenizer.l | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l index e77f1b2..b92ca77 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -252,6 +252,18 @@ static void handleHtmlTag() g_token->endTag = startNamePos==2; } +static QString stripEmptyLines(const char *s) +{ + int result=0,p=0; + for (;;) + { + int c; + while ((c=s[p]) && (c==' ' || c=='\t' || c=='\r')) p++; + if (s[p]=='\n') result=++p; else break; + } + return &s[result]; +} + //-------------------------------------------------------------------------- #undef YY_INPUT @@ -565,6 +577,7 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}? g_token->verb+=yytext; } <St_Verbatim>{CMD}"endverbatim" { + g_token->verb=stripEmptyLines(g_token->verb); return RetVal_OK; } <St_Verbatim>[^\\@\n]+ | |