From 4c23a545ab79169a2f14c1e0f97c4a860856a64c Mon Sep 17 00:00:00 2001 From: Kevin Hendricks Date: Tue, 10 Dec 2024 15:00:09 -0500 Subject: [PATCH] make TagLister better handle xml whitespace chars --- src/Parsers/TagLister.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Parsers/TagLister.cpp b/src/Parsers/TagLister.cpp index 02645dc3e7..305ec6cb87 100644 --- a/src/Parsers/TagLister.cpp +++ b/src/Parsers/TagLister.cpp @@ -30,6 +30,7 @@ #include "Parsers/TagLister.h" #include "sigil_constants.h" +const QString WHITESPACE_CHARS=" \t\n\r"; // valid in pure xml // public interface @@ -433,7 +434,7 @@ int TagLister::findTarget(const QString &tgt, int p, bool after) int TagLister::skipAnyBlanks(const QStringView tgt, int p) { - while((p < tgt.length()) && (tgt.at(p) == ' ')) p++; + while((p < tgt.length()) && (WHITESPACE_CHARS.contains(tgt.at(p)))) p++; return p; }