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")