summaryrefslogtreecommitdiff
path: root/tex/context/base/data-vir.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/data-vir.lua')
-rw-r--r--tex/context/base/data-vir.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/tex/context/base/data-vir.lua b/tex/context/base/data-vir.lua
index 89359c19a..dff780fc7 100644
--- a/tex/context/base/data-vir.lua
+++ b/tex/context/base/data-vir.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['data-vir'] = {
license = "see context related readme files"
}
-local format = string.format
+local format, validstrings = string.format, string.valid
local trace_virtual = false
local report_virtual = logs.reporter("resolvers","virtual")
@@ -18,7 +18,9 @@ local resolvers = resolvers
local finders, openers, loaders, savers = resolvers.finders, resolvers.openers, resolvers.loaders, resolvers.savers
-local data, n, template = { }, 0, "virtual://%s.%s" -- hm, number can be query
+local data = { }
+local n = 0 -- hm, number can be query
+local template = "virtual://%s.%s"
function savers.virtual(specification,content)
n = n + 1 -- one number for all namespaces
@@ -54,7 +56,7 @@ function openers.virtual(specification)
if trace_virtual then
report_virtual("opener, file '%s' opened",original)
end
- data[original] = nil
+ data[original] = nil -- when we comment this we can have error messages
-- With utf-8 we signal that no regime is to be applied!
return openers.helpers.textopener("virtual",original,d,"utf-8")
else