summaryrefslogtreecommitdiffstats
path: root/src/doctokenizer.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2005-02-10 18:38:13 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2005-02-10 18:38:13 (GMT)
commit2ed43d4c3890c98475d4deb87d4a14ab949f90c4 (patch)
tree654e62c3ea86e579f0642040b094a844d4e5223c /src/doctokenizer.l
parentc00ba20bdfa987c9554d4068fc9ccf1a45fe28f8 (diff)
downloadDoxygen-2ed43d4c3890c98475d4deb87d4a14ab949f90c4.zip
Doxygen-2ed43d4c3890c98475d4deb87d4a14ab949f90c4.tar.gz
Doxygen-2ed43d4c3890c98475d4deb87d4a14ab949f90c4.tar.bz2
Release-1.4.1-20050210
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r--src/doctokenizer.l13
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]+ |