diff options
author | Marius <mariausol@gmail.com> | 2013-02-05 18:00:28 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-02-05 18:00:28 +0200 |
commit | 4da65414b21ec97421091a2df4306455f8ed1146 (patch) | |
tree | 76780b6d45209c414bcdcd2125d34dadb75ea399 /tex/context/base/trac-lmx.lua | |
parent | 81b259023be92950100711433ea17f3cdebf45fb (diff) | |
download | context-4da65414b21ec97421091a2df4306455f8ed1146.tar.gz |
beta 2013.02.05 13:35
Diffstat (limited to 'tex/context/base/trac-lmx.lua')
-rw-r--r-- | tex/context/base/trac-lmx.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tex/context/base/trac-lmx.lua b/tex/context/base/trac-lmx.lua index 2754dd16d..d20241735 100644 --- a/tex/context/base/trac-lmx.lua +++ b/tex/context/base/trac-lmx.lua @@ -142,6 +142,10 @@ local function loadedfile(name) return data end +local function loadedsubfile(name) + return io.loaddata(resolvers and resolvers.findfile and resolvers.findfile(name) or name) +end + lmx.loadedfile = loadedfile -- A few helpers (the next one could end up in l-lpeg): @@ -208,14 +212,15 @@ local function do_type_variable(str) end local function do_include(filename) - local data = loadedfile(filename) + local data = loadedsubfile(filename) if (not data or data == "") and type(usedpaths) == "table" then for i=1,#usedpaths do - data = loadedfile(joinpath(usedpaths[i],filename)) + data = loadedsubfile(joinpath(usedpaths[i],filename)) end end if not data or data == "" then data = format("<!-- unknown lmx include file: %s -->",filename) + report_lmx("empty include file: %s",filename) end return data end |