Skip to content

Commit 9824a45

Browse files
Fix baseURL example
Updated example usage of URLPattern in README.
1 parent 27f8dd6 commit 9824a45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ print(result["pathname"]["groups"]["id"]) # output: 4163
6262
```py
6363
from urlpattern import URLPattern
6464

65-
pattern = URLPattern({"pathname": "/admin/*"}, "https://example.com")
66-
print(pattern.test({"pathname": "/admin/main/"}, "https://example.com")) # output: True
67-
print(pattern.test("/admin/main/", "https://example.com")) # output: True
65+
pattern = URLPattern("/test", "https://example.com")
66+
print(pattern.test("/test", "https://example.com")) # output: True
67+
print(pattern.test({"pathname": "/test", "baseURL": "https://example.com"})) # output: True
6868
```
6969

7070
### `ignoreCase`

0 commit comments

Comments
 (0)