Skip to content

Commit

Permalink
make TagLister better handle xml whitespace chars
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhendricks committed Dec 10, 2024
1 parent 3907ad3 commit 4c23a54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Parsers/TagLister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 4c23a54

Please sign in to comment.