about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-04-30 19:52:07 +0200
committerbptato <nincsnevem662@gmail.com>2023-04-30 19:52:07 +0200
commit15fe78e9ffec7818a44838d71e99b4355374819d (patch)
tree352fe0687b189fd64766b19886d2256327460d9e /src
parent805f29abe74e46251c77ee5301bab6f49ad1ddaa (diff)
downloadchawan-15fe78e9ffec7818a44838d71e99b4355374819d.tar.gz
what 003ca26b was supposed to do
Diffstat (limited to 'src')
-rw-r--r--src/types/url.nim2
-rw-r--r--src/utils/twtstr.nim1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/types/url.nim b/src/types/url.nim
index 75d6e050..10b91fe5 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -381,7 +381,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 AsciiAlpha + {'+', '-', '.'}:
+      if has and c in AsciiAlphaNumeric + {'+', '-', '.'}:
         buffer &= c.tolower()
       elif has and c == ':':
         if override:
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index aea8bea5..027b26d1 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -23,6 +23,7 @@ const AsciiLowerAlpha* = {'a'..'z'}
 const AsciiAlpha* = (AsciiUpperAlpha + AsciiLowerAlpha)
 const NonAscii* = (AllChars - Ascii)
 const AsciiDigit* = {'0'..'9'}
+const AsciiAlphaNumeric* = AsciiAlpha + AsciiDigit
 const AsciiHexDigit* = (AsciiDigit + {'a'..'f', 'A'..'F'})
 const AsciiWhitespace* = {' ', '\n', '\r', '\t', '\f'}