summaryrefslogtreecommitdiff
path: root/tex/context/base/l-url.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/l-url.lua')
-rw-r--r--tex/context/base/l-url.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/tex/context/base/l-url.lua b/tex/context/base/l-url.lua
index 8e96b4525..b189ec5bb 100644
--- a/tex/context/base/l-url.lua
+++ b/tex/context/base/l-url.lua
@@ -256,7 +256,7 @@ function url.construct(hash) -- dodo: we need to escape !
return lpegmatch(escaper,concat(fullurl))
end
-local pattern = Cs(noslash * R("az","AZ") * (S(":|")/":") * noslash * P(1)^0)
+local pattern = Cs(slash^-1/"" * R("az","AZ") * ((S(":|")/":") + P(":")) * slash * P(1)^0)
function url.filename(filename)
local spec = hashed(filename)
@@ -266,6 +266,7 @@ end
-- print(url.filename("/c|/test"))
-- print(url.filename("/c/test"))
+-- print(url.filename("file:///t:/sources/cow.svg"))
local function escapestring(str)
return lpegmatch(escaper,str)