diff options
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r-- | src/doctokenizer.l | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 61a98b5..5b8ae93 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2002 by Dimitri van Heesch. + * Copyright (C) 1997-2003 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -293,8 +293,8 @@ WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?" WORD1NQ [^ \t\n\r\\@<>()\[\]:;\?{}&$#,."]+ WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" -HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" -HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" +HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" +HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" HTMLKEYW {HTMLKEYL}|{HTMLKEYU} LABELID [a-z_A-Z][a-z_A-Z0-9\-]* @@ -402,8 +402,12 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* g_token->attribs.clear(); int startNamePos=1; if (g_token->name.at(1)=='/') startNamePos++; - int attSep = g_token->name.find(' '); - if (attSep!=-1) // tag has one or more options + int attSep=0; + while (attSep<yyleng && !isspace(yytext[attSep])) + { + attSep++; + } + if (attSep!=yyleng) // tag has one or more options { parseHtmlAttribs(g_token->name.mid(attSep+1,g_token->name.length()-attSep-2)); g_token->name=g_token->name.mid(startNamePos,attSep-1).lower(); |