Skip to content

Commit

Permalink
removed handiling the sequential / (#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjkkkjjj committed Aug 9, 2024
1 parent 88ddd77 commit 758a205
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions channels/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ def _parse_resolver(child_url_pattern, parent_resolver, parent_regex, routes):

# Remove the redundant caret ^ which is appended by `path` function
regex = re.sub(r"(?<!^)\^", "", regex)
# Remove the sequential '/'
regex = re.sub(r"(/)\1+", r"\1", regex)

name = (
f"{parent_resolver.app_name}:{child_url_pattern.name}"
if child_url_pattern.name
Expand Down Expand Up @@ -245,7 +244,7 @@ def reverse(*args, urlconf=None, **kwargs):
urlconf : str, optional
The root path of the routings, by default None
See the django's
See the django's
[reverse](https://docs.djangoproject.com/en/5.0/ref/urlresolvers/#reverse)
for more details of the other arguments
Expand Down

0 comments on commit 758a205

Please sign in to comment.