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