diff options
author | bptato <nincsnevem662@gmail.com> | 2023-04-30 17:12:44 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-04-30 17:12:44 +0200 |
commit | 003ca26bb17b14e0f8c83f7c95f7f8d73b9da993 (patch) | |
tree | 684c757e13bfaec6cbe82267f21fcf909ae95fd4 | |
parent | 234160fd86fb66b637d060de58ee7d5b8d8daabc (diff) | |
download | chawan-003ca26bb17b14e0f8c83f7c95f7f8d73b9da993.tar.gz |
url: accept schemes containing numbers
-rw-r--r-- | src/types/url.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/types/url.nim b/src/types/url.nim index 69df47c3..354f508b 100644 --- a/src/types/url.nim +++ b/src/types/url.nim @@ -369,6 +369,7 @@ proc basicParseUrl*(input: string, base = none(Url), url: Url = Url(), stateOver template is_empty(path: UrlPath): bool = path.ss.len == 0 while pointer <= input.len: + eprint "state", state case state of SCHEME_START_STATE: if has and c.isAlphaAscii(): @@ -381,7 +382,7 @@ proc basicParseUrl*(input: string, base = none(Url), url: Url = Url(), stateOver #TODO validation error return none(Url) of SCHEME_STATE: - if has and c in Letters + {'+', '-', '.'}: + if has and c in AsciiAlpha + {'+', '-', '.'}: buffer &= c.tolower() elif has and c == ':': if override: |