Skip to content

Commit

Permalink
add comment for regex (#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjkkkjjj committed Aug 3, 2024
1 parent 76260f7 commit 7ca0037
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions channels/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __init__(self, routes):
x.pattern
for x in [route.pattern.regex, url_pattern.pattern.regex]
)
# Remove the sequential '/'
regex = re.sub(r"(/)\1+", r"\1", regex)
name = (
f"{route.app_name}:{url_pattern.name}"
Expand Down

0 comments on commit 7ca0037

Please sign in to comment.