From 379e5137e869152f3123fbbdb6a5053fac686aa7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 31 Jul 2020 22:48:28 +0530 Subject: [PATCH] Fix missing formatting around attribute values in the comments editor HTML syntax highlighter --- src/calibre/gui2/comments_editor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 7bf764feb2..5dfd612d5a 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -922,6 +922,7 @@ class Highlighter(QSyntaxHighlighter): if ch == '>': state = State_Text + self.setFormat(pos-1, 1, self.colors['tag']) break if not ch.isspace(): @@ -959,11 +960,13 @@ class Highlighter(QSyntaxHighlighter): # handle opening single quote if ch == "'": state = State_SingleQuote + self.setFormat(pos - 1, 1, self.colors['attrval']) break # handle opening double quote if ch == '"': state = State_DoubleQuote + self.setFormat(pos - 1, 1, self.colors['attrval']) break if not ch.isspace():