Fix/be respectful of special characters like exclamation marks in highlight phrases since they are also word boundaries (#1890)
* Add missing includes We would normally have these included in another file already, or even the precompiled headers, but having the files included here too makes testing single parts easier. * Modify the regex building of highlight phrases for non-regex phrases For phrases like !test, the word boundary checking we did before was not enough, so we now check for either a word boundary, a whitespace character, or the line start/end. * Add tests for ensuring I haven't fully broken the highlight system * Add changelog entry
This commit is contained in:
@@ -4,10 +4,14 @@
|
||||
#include "util/RapidJsonSerializeQString.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
|
||||
#include <QColor>
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <pajlada/serialize.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class HighlightPhrase
|
||||
|
||||
Reference in New Issue
Block a user