mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix issue on Windows not matching links correctly.
In Windows a carriage return(Hex 0D) is separate from new line(Hex 0A). Before it was only replacing the new line with | and leaving it with the carriage return. Linux ignores these by default I think. So that when on Windows it created improperly formatted data for the regex syntax. This fix still replaces new line with | but it also removes anything considered a space with \s
This commit is contained in:
parent
712a292d7e
commit
7a4fafa8fc
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ LinkParser::LinkParser(const QString &unparsedString)
|
||||||
t1.setCodec("UTF-8");
|
t1.setCodec("UTF-8");
|
||||||
|
|
||||||
// Read the TLDs in and replace the newlines with pipes
|
// Read the TLDs in and replace the newlines with pipes
|
||||||
QString tldData = t1.readAll().replace("\n", "|");
|
QString tldData = t1.readAll().replace(QRegExp("[\\n]"), "|").remove(QRegExp("[\\s]"));
|
||||||
|
|
||||||
const QString urlRegExp =
|
const QString urlRegExp =
|
||||||
"^"
|
"^"
|
||||||
|
|
Loading…
Reference in a new issue