From 667a9e8f466f5c97b962b6885d575e6b01405542 Mon Sep 17 00:00:00 2001 From: DEC05EBA Date: Wed, 1 Jan 2020 18:14:32 +0100 Subject: Do not skip whitespaces in text in pre tags --- include/HtmlParser.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/HtmlParser.h b/include/HtmlParser.h index b01a59e..a60e6d5 100644 --- a/include/HtmlParser.h +++ b/include/HtmlParser.h @@ -41,11 +41,13 @@ struct HtmlParser { int is_tag_void; int inside_script_tag; + int pre_tag_depth; size_t unclosed_tags_offset; HtmlStringView unclosed_tags[UNCLOSED_TAGS_SIZE]; }; +/* Note: HTML_PARSE_TAG_START is guaranteed to be called for a tag before HTML_PARSE_TAG_END */ void html_parser_init(HtmlParser *self, const char *html_source, size_t len, HtmlParseCallback parse_callback, void *userdata); void html_parser_deinit(HtmlParser *self); -- cgit v1.2.3