-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Message::appendText): QRegularExpression whitespace bug
Unlike QRegExp, when a QRegularExpression starts with \s, it may match whitespace *including newlines*. So when looking for the start of a section, we might match "\n\n == January 2025 ==" instead of " == January 2025 ==" Then the logic that tries to skip past the header, would instead skip past the first \n, which is still _before_ the header. Then we would think the target header is the start of the next section, and we would end up inserting a message just before the section it was intended to be appended to. QRegularExpression is available since Qt 5.0 and is recommended. Let's get rid of the old QRegExp and fix the QRegularExpression usage.
- Loading branch information
Showing
1 changed file
with
14 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters