We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4b0824 commit b752c92Copy full SHA for b752c92
1 file changed
emmett_core/routing/router.py
@@ -106,7 +106,8 @@ def _split_lang(router, path):
106
if len(path) <= 1:
107
return path, default
108
clean_path = path.lstrip("/")
109
- if clean_path[2:3] == "/":
+ next_sep = clean_path[2:3]
110
+ if not next_sep or next_sep == "/":
111
lang, new_path = clean_path[:2], clean_path[2:]
112
if lang != default and lang in router.app._languages_set:
113
return new_path, lang
0 commit comments