From 50ee2874a5c5da4a652e10218489314d2846615b Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Mon, 1 May 2023 20:37:52 +0200 Subject: [PATCH] ... --- src/calibre/gui2/markdown_syntax_highlighter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/markdown_syntax_highlighter.py b/src/calibre/gui2/markdown_syntax_highlighter.py index ba512410b5..adb280a7e4 100644 --- a/src/calibre/gui2/markdown_syntax_highlighter.py +++ b/src/calibre/gui2/markdown_syntax_highlighter.py @@ -290,7 +290,7 @@ class MarkdownHighlighter(QSyntaxHighlighter): found = False for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['CodeBlock'],text): stripped = text.lstrip() - if stripped[0] not in ('*','-','+','>') and not re.match('\d+\.', stripped): + if stripped[0] not in ('*','-','+','>') and not re.match(r'\d+\.', stripped): self.setFormat(self.offset+ mo.start(), mo.end() - mo.start(), self.MARKDOWN_KWS_FORMAT['CodeBlock']) found = True return found