summaryrefslogtreecommitdiff
path: root/tex/context/base/l-url.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-01-14 18:25:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-01-14 18:25:00 +0100
commit45d11a2f318b118a2592b9db7eb530a4cf613a00 (patch)
tree060a66d60c1e5e7c3326e5776476ee90e2cb1e43 /tex/context/base/l-url.lua
parent3dbcef73aec79246dfc4238eb7af28d3fa54e1f3 (diff)
downloadcontext-45d11a2f318b118a2592b9db7eb530a4cf613a00.tar.gz
beta 2010.01.14 18:25
Diffstat (limited to 'tex/context/base/l-url.lua')
-rw-r--r--tex/context/base/l-url.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/tex/context/base/l-url.lua b/tex/context/base/l-url.lua
index 1d282a178..5290df2fc 100644
--- a/tex/context/base/l-url.lua
+++ b/tex/context/base/l-url.lua
@@ -32,7 +32,9 @@ local hexdigit = lpeg.R("09","AF","af")
local plus = lpeg.P("+")
local escaped = (plus / " ") + (percent * lpeg.C(hexdigit * hexdigit) / tochar)
-local scheme = lpeg.Cs((escaped+(1-colon-slash-qmark-hash))^0) * colon + lpeg.Cc("")
+-- we assume schemes with more than 1 character (in order to avoid problems with windows disks)
+
+local scheme = lpeg.Cs((escaped+(1-colon-slash-qmark-hash))^2) * colon + lpeg.Cc("")
local authority = slash * slash * lpeg.Cs((escaped+(1- slash-qmark-hash))^0) + lpeg.Cc("")
local path = slash * lpeg.Cs((escaped+(1- qmark-hash))^0) + lpeg.Cc("")
local query = qmark * lpeg.Cs((escaped+(1- hash))^0) + lpeg.Cc("")