Merge pull request #172 from ad-m/patch-1
Fix catastrophic backtracking in regexp
This commit is contained in:
@@ -286,7 +286,7 @@ def process_marked_lines(lines, markers, return_flags=[False, -1, -1]):
|
|||||||
# inlined reply
|
# inlined reply
|
||||||
# use lookbehind assertions to find overlapping entries e.g. for 'mtmtm'
|
# use lookbehind assertions to find overlapping entries e.g. for 'mtmtm'
|
||||||
# both 't' entries should be found
|
# both 't' entries should be found
|
||||||
for inline_reply in re.finditer('(?<=m)e*((?:t+e*)+)m', markers):
|
for inline_reply in re.finditer('(?<=m)e*(t[te]*)m', markers):
|
||||||
# long links could break sequence of quotation lines but they shouldn't
|
# long links could break sequence of quotation lines but they shouldn't
|
||||||
# be considered an inline reply
|
# be considered an inline reply
|
||||||
links = (
|
links = (
|
||||||
|
|||||||
Reference in New Issue
Block a user