From cbc425c7d7d0075d0905bc2255f52ebcf009cb6a Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Fri, 24 May 2024 18:29:41 +0200 Subject: [PATCH] Add few blank lines to make code easier to read --- picard/ui/widgets/scripttextedit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/picard/ui/widgets/scripttextedit.py b/picard/ui/widgets/scripttextedit.py index f9401a8ce..0ac823f90 100644 --- a/picard/ui/widgets/scripttextedit.py +++ b/picard/ui/widgets/scripttextedit.py @@ -105,24 +105,31 @@ class TaggerScriptSyntaxHighlighter(QtGui.QSyntaxHighlighter): self.func_fmt = QtGui.QTextCharFormat() self.func_fmt.setFontWeight(QtGui.QFont.Weight.Bold) self.func_fmt.setForeground(syntax_theme.func) + self.var_re = re.compile(r"%[_a-zA-Z0-9:]*%") self.var_fmt = QtGui.QTextCharFormat() self.var_fmt.setForeground(syntax_theme.var) + self.unicode_re = re.compile(r"\\u[a-fA-F0-9]{4}") self.unicode_fmt = QtGui.QTextCharFormat() self.unicode_fmt.setForeground(syntax_theme.escape) + self.escape_re = re.compile(r"\\[^u]") self.escape_fmt = QtGui.QTextCharFormat() self.escape_fmt.setForeground(syntax_theme.escape) + self.special_re = re.compile(r"[^\\][(),]") self.special_fmt = QtGui.QTextCharFormat() self.special_fmt.setForeground(syntax_theme.special) + self.bracket_re = re.compile(r"[()]") + self.noop_re = re.compile(r"\$noop\(") self.noop_fmt = QtGui.QTextCharFormat() self.noop_fmt.setFontWeight(QtGui.QFont.Weight.Bold) self.noop_fmt.setFontItalic(True) self.noop_fmt.setForeground(syntax_theme.noop) + self.rules = [ (self.func_re, self.func_fmt, 0, -1), (self.var_re, self.var_fmt, 0, 0),