From f8d6a1a586b0a15fa10f7149af72c8c2084770d1 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 5 Jun 2022 23:37:23 +0200 Subject: [PATCH] gui: mainwindow: Use Unicode category class to extract highlight words --- gui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index f61e45a..1647a89 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -502,7 +502,7 @@ void MainWindow::makePreviews(int page) scaleText.chop(1); QVector wordsToHighlight; - QRegularExpression extractor(R"#("([^"]*)"|(\w+))#"); + QRegularExpression extractor(R"#("([^"]*)"|(\p{L}+))#"); for(const Token &token : this->contentSearchQuery.getTokens()) { if(token.type == FILTER_CONTENT_CONTAINS)