Fixes a bug in highlighter that makes it slow

This commit is contained in:
Olivier Keshavjee 2017-11-28 16:24:58 +01:00
parent 2b1465a1f3
commit 91989269f1

View file

@ -260,7 +260,7 @@ class MarkdownTokenizer(HighlightTokenizer):
else:
# Restart tokenizing on the previous line.
self.requestBacktrack()
False
return False
return False
@ -450,7 +450,6 @@ class MarkdownTokenizer(HighlightTokenizer):
MS.MarkdownStateBlockquote,
MS.MarkdownStateNumberedList,
MS.MarkdownStateBulletPointList,]:
self.requestBacktrack()
if self.lineBreakRegex.exactMatch(text):
token = Token()
token.type = MTT.TokenLineBreak