Show More
@@ -542,8 +542,11 def _preparepats(): | |||
|
542 | 542 | for i, pseq in enumerate(pats): |
|
543 | 543 | # fix-up regexes for multi-line searches |
|
544 | 544 | p = pseq[0] |
|
545 | # \s doesn't match \n | |
|
546 | p = re.sub(r'(?<!\\)\\s', r'[ \\t]', p) | |
|
545 | # \s doesn't match \n (done in two steps) | |
|
546 | # first, we replace \s that appears in a set already | |
|
547 | p = re.sub(r'\[\\s', r'[ \\t', p) | |
|
548 | # now we replace other \s instances. | |
|
549 | p = re.sub(r'(?<!(\\|\[))\\s', r'[ \\t]', p) | |
|
547 | 550 | # [^...] doesn't match newline |
|
548 | 551 | p = re.sub(r'(?<!\\)\[\^', r'[^\\n', p) |
|
549 | 552 |
General Comments 0
You need to be logged in to leave comments.
Login now