Ticket #16362: django-regex-allow-lookahead-16362.patch
File django-regex-allow-lookahead-16362.patch, 1.5 KB (added by , 13 years ago) |
---|
-
django/utils/regex_helper.py
51 51 (3) Select the first (essentially an arbitrary) element from any character 52 52 class. Select an arbitrary character for any unordered class (e.g. '.' 53 53 or '\w') in the pattern. 54 (5) Ignore comments and any of the reg-exp flags that won't change 55 what we construct ("iLmsu"). "(?x)" is an error, however. 56 (6) Raise an error on all other non-capturing (?...) forms (e.g. 57 look-ahead and look-behind matches) and any disjunctive ('|') 58 constructs. 54 (5) Ignore comments, look-ahead and look-behind assertions, and any of the 55 reg-exp flags that won't change what we construct ("iLmsu"). "(?x)" is 56 an error, however. 57 (6) Raise an error on any disjunctive ('|') constructs. 59 58 60 59 Django's URLs for forward resolving are either all positional arguments or 61 60 all keyword arguments. That is assumed here, as well. Although reverse … … 121 120 walk_to_end(ch, pattern_iter) 122 121 else: 123 122 ch, escaped = pattern_iter.next() 124 if ch in "iLmsu# ":123 if ch in "iLmsu#!=<": 125 124 # All of these are ignorable. Walk to the end of the 126 125 # group. 127 126 walk_to_end(ch, pattern_iter)