6 #include "../hunspell/csutil.hxx"
7 #include "htmlparser.hxx"
14 static const char * PATTERN[][2] = {
15 { "<script", "</script>" },
16 { "<style", "</style>" },
17 { "<code", "</code>" },
18 { "<samp", "</samp>" },
21 { "<listing", "</listing>" },
22 { "<address", "</address>" },
25 { "<[cdata[", "]]>" }, // XML comment
29 #define PATTERN_LEN (sizeof(PATTERN) / (sizeof(char *) * 2))
31 static const char * PATTERN2[][2] = {
32 { "<img", "alt=" }, // ALT and TITLE attrib handled spec.
37 #define PATTERN_LEN2 (sizeof(PATTERN2) / (sizeof(char *) * 2))
39 HTMLParser::HTMLParser(const char * wordchars)
44 HTMLParser::HTMLParser(unsigned short * wordchars, int len)
49 char * HTMLParser::next_token()
51 return XMLParser::next_token(PATTERN, PATTERN_LEN, PATTERN2, PATTERN_LEN2);
54 HTMLParser::~HTMLParser()