From: Adam Dickmeiss Date: Tue, 10 Sep 2013 11:58:43 +0000 (+0200) Subject: Try to reduce splitting of text nodes X-Git-Tag: v1.3.62~5 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=73c1b7597e636f6bd66d7fbcdd2f8e8d0ae342f5;p=metaproxy-moved-to-github.git Try to reduce splitting of text nodes --- diff --git a/src/html_parser.cpp b/src/html_parser.cpp index abbdeba..1a403d4 100644 --- a/src/html_parser.cpp +++ b/src/html_parser.cpp @@ -264,8 +264,7 @@ void mp::HTMLParser::Rep::parse_str(HTMLParserEvent &event, const char *cp) else if (*cp == '/' && isAlpha(cp[1])) { int i; - tagText(event, text_start, cp - 1); - + i = skipName(++cp); if (!nest) @@ -274,10 +273,10 @@ void mp::HTMLParser::Rep::parse_str(HTMLParserEvent &event, const char *cp) nest = true; else { - text_start = cp - 1; // points to '/' continue; } } + tagText(event, text_start, cp - 2); event.closeTag(cp, i); if (m_verbose) printf("------ tag close %.*s\n", i, cp);