From b45d0238f4500cba824e524c18d3bc578faa3db6 Mon Sep 17 00:00:00 2001 From: Jonas Diemer Date: Mon, 15 Dec 2025 19:37:09 +0100 Subject: [PATCH] Treat tabs as whitespace (so they are properly stripped) --- lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp index 9c2e9e9..ea15e1a 100644 --- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp +++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp @@ -25,7 +25,7 @@ constexpr int NUM_IMAGE_TAGS = sizeof(IMAGE_TAGS) / sizeof(IMAGE_TAGS[0]); const char* SKIP_TAGS[] = {"head", "table"}; constexpr int NUM_SKIP_TAGS = sizeof(SKIP_TAGS) / sizeof(SKIP_TAGS[0]); -bool isWhitespace(const char c) { return c == ' ' || c == '\r' || c == '\n'; } +bool isWhitespace(const char c) { return c == ' ' || c == '\r' || c == '\n' || c == '\t'; } // given the start and end of a tag, check to see if it matches a known tag bool matches(const char* tag_name, const char* possible_tags[], const int possible_tag_count) {