Show More
@@ -247,7 +247,7 b' def _globre(pat):' | |||
|
247 | 247 | i, n = 0, len(pat) |
|
248 | 248 | res = '' |
|
249 | 249 | group = 0 |
|
250 | escape = re.escape | |
|
250 | escape = util.re.escape | |
|
251 | 251 | def peek(): |
|
252 | 252 | return i < n and pat[i] |
|
253 | 253 | while i < n: |
@@ -310,11 +310,11 b' def _regex(kind, pat, globsuffix):' | |||
|
310 | 310 | if kind == 're': |
|
311 | 311 | return pat |
|
312 | 312 | if kind == 'path': |
|
313 | return '^' + re.escape(pat) + '(?:/|$)' | |
|
313 | return '^' + util.re.escape(pat) + '(?:/|$)' | |
|
314 | 314 | if kind == 'relglob': |
|
315 | 315 | return '(?:|.*/)' + _globre(pat) + globsuffix |
|
316 | 316 | if kind == 'relpath': |
|
317 | return re.escape(pat) + '(?:/|$)' | |
|
317 | return util.re.escape(pat) + '(?:/|$)' | |
|
318 | 318 | if kind == 'relre': |
|
319 | 319 | if pat.startswith('^'): |
|
320 | 320 | return pat |
General Comments 0
You need to be logged in to leave comments.
Login now