From a59f9fe8cbd5b4480ec52777fa60302a4b8b4733 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" Date: Fri, 10 May 2019 23:26:29 +0200 Subject: [PATCH] Fixed the spell check regex for italics and underscore text --- nw/gui/dochighlight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nw/gui/dochighlight.py b/nw/gui/dochighlight.py index 56d76f1e..5efad405 100644 --- a/nw/gui/dochighlight.py +++ b/nw/gui/dochighlight.py @@ -145,7 +145,7 @@ class GuiDocHighlighter(QSyntaxHighlighter): # Build a QRegExp for each pattern and for the spell checker self.rules = [(QRegularExpression(a),b) for (a,b) in self.hRules] - self.spellRx = QRegularExpression(r"[\w\'{:s}]+".format(self.mainConf.fmtApostrophe)) + self.spellRx = QRegularExpression(r"[\w\'{:s}&&[^_]]+".format(self.mainConf.fmtApostrophe)) logger.debug("DocHighlighter initialisation complete")