mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
b35fc9861b
commit
50ee2874a5
@ -290,7 +290,7 @@ class MarkdownHighlighter(QSyntaxHighlighter):
|
|||||||
found = False
|
found = False
|
||||||
for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['CodeBlock'],text):
|
for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['CodeBlock'],text):
|
||||||
stripped = text.lstrip()
|
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'])
|
self.setFormat(self.offset+ mo.start(), mo.end() - mo.start(), self.MARKDOWN_KWS_FORMAT['CodeBlock'])
|
||||||
found = True
|
found = True
|
||||||
return found
|
return found
|
||||||
|
Loading…
x
Reference in New Issue
Block a user