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