Skip to content

fix: handle leading forward slash in pattern matching path function #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove whitespace
  • Loading branch information
russellwheatley committed Jul 10, 2023
commit ebb62e74ed92c8701c09d9fdb2ac842eb7fa9c20
2 changes: 1 addition & 1 deletion src/firebase_functions/private/path_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def has_captures(self) -> bool:
def extract_matches(self, path: str) -> dict[str, str]:
segments = self.segments
if self.segments[0].value == "":
# if leading slash, there will be an empty segment which increases
# if leading slash, there will be an empty segment which increases
# the path index, we pop to remove it
segments.pop(0)
matches: dict[str, str] = {}
Expand Down