From 73c1b7597e636f6bd66d7fbcdd2f8e8d0ae342f5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 10 Sep 2013 13:58:43 +0200 Subject: [PATCH] Try to reduce splitting of text nodes --- src/html_parser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); -- 1.7.10.4