From 4da65414b21ec97421091a2df4306455f8ed1146 Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 5 Feb 2013 18:00:28 +0200 Subject: beta 2013.02.05 13:35 --- tex/context/base/trac-lmx.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tex/context/base/trac-lmx.lua') 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("",filename) + report_lmx("empty include file: %s",filename) end return data end -- cgit v1.2.3