summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-server-ctx-help.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
committerMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
commit965214d981e6129b782c67adcaf3a81aedcb0bac (patch)
tree84f5945aae8efc9b6eb1898b873be5453cafe43d /scripts/context/lua/mtx-server-ctx-help.lua
parente7d0d90a434e5452ff9e86c8abab5a4cac35e2f1 (diff)
downloadcontext-965214d981e6129b782c67adcaf3a81aedcb0bac.tar.gz
stable 2013.05.28 00:36
Diffstat (limited to 'scripts/context/lua/mtx-server-ctx-help.lua')
-rw-r--r--scripts/context/lua/mtx-server-ctx-help.lua24
1 files changed, 5 insertions, 19 deletions
diff --git a/scripts/context/lua/mtx-server-ctx-help.lua b/scripts/context/lua/mtx-server-ctx-help.lua
index d948c6e46..b8dc0dfb2 100644
--- a/scripts/context/lua/mtx-server-ctx-help.lua
+++ b/scripts/context/lua/mtx-server-ctx-help.lua
@@ -542,11 +542,11 @@ function document.setups.collect(name,int,lastmode)
local left, right = d[k].at.name or "?", { }
if tag == "inherit" then
local name = d[k].at.name or "?"
- local url = format(document.setups.formats.href_as_command[lastmode],name,lastmode,name)
+ local goto = format(document.setups.formats.href_as_command[lastmode],name,lastmode,name)
if #parameters > 0 and not find(parameters[#parameters],"<br/>") then
parameters[#parameters+1] = format(formats.parameter,"<br/>","","")
end
- parameters[#parameters+1] = format(formats.parameter,what,format(formats.special,translate("inherits",int)),url)
+ parameters[#parameters+1] = format(formats.parameter,what,format(formats.special,translate("inherits",int)),goto)
else
for r, d, k in xml.elements(d[k],"(cd:constant|cd:resolve)") do
local tag = d[k].tg
@@ -664,23 +664,9 @@ local function doit(configuration,filename,hashed)
if document.setups.showsources and lastsource and lastsource ~= "" then
-- todo: mkii, mkiv, tex (can be different)
- local name = lastsource
- local full = resolvers.findfile(name)
- if full == "" and file.suffix(lastsource) == "tex" then
- name = file.replacesuffix(lastsource,"mkiv")
- full = resolvers.findfile(name)
- if full == "" then
- name = file.replacesuffix(lastsource,"mkvi")
- full = resolvers.findfile(name)
- end
- end
- if full == "" then
- variables.maintitle = lastsource
- variables.maintext = format(formats.listing,"no source found")
- else
- variables.maintitle = name
- variables.maintext = format(formats.listing,io.loaddata(full))
- end
+ local data = io.loaddata(resolvers.findfile(lastsource))
+ variables.maintitle = lastsource
+ variables.maintext = format(formats.listing,data)
lastsource = ""
elseif lastcommand and lastcommand ~= "" then
local data = document.setups.collect(lastcommand,lastinterface,lastmode)