From 8129ef8dd31ff3c48641ff48dd595c8532bc16cc 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 3c1f5ca..b6927b7 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) {