summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-06-09 12:49:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-06-09 12:49:00 +0200
commit513177ada9eb9b29f01e3ff34de1338ddb66f617 (patch)
treedfe7bfb633febab31cb9e6a279b9ddb3c3d5a3f4 /scripts
parentb7fd48a4efe7de9a2fb344a30c79a63fdce16e80 (diff)
downloadcontext-513177ada9eb9b29f01e3ff34de1338ddb66f617.tar.gz
beta 2011.06.09 12:49
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua11
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua11
-rwxr-xr-xscripts/context/stubs/unix/mtxrun11
3 files changed, 27 insertions, 6 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index abd4f964c..d0cf3d46d 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -6693,7 +6693,9 @@ local function handle_any_entity(str)
if resolve then
local a = acache[str] -- per instance ! todo
if not a then
+print(">1",str,a)
a = resolve_predefined and predefined_simplified[str]
+print(">2",str,a)
if a then
-- one of the predefined
elseif type(resolve) == "function" then
@@ -6701,15 +6703,20 @@ local function handle_any_entity(str)
else
a = entities[str]
end
+print(">3",str,a)
if a then
if type(a) == "function" then
- report_xml("expanding entity &%s; (function)",str)
+ if trace_entities then
+ report_xml("expanding entity &%s; (function)",str)
+ end
a = a(str) or ""
end
+print(">4",str,a)
+ a = lpegmatch(parsedentity,a) or a
+print(">5",str,a)
if trace_entities then
report_xml("resolved entity &%s; -> %s (internal)",str,a)
end
- a = lpegmatch(parsedentity,a) or a
else
local unknown_any_entity = placeholders.unknown_any_entity
if unknown_any_entity then
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index abd4f964c..d0cf3d46d 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -6693,7 +6693,9 @@ local function handle_any_entity(str)
if resolve then
local a = acache[str] -- per instance ! todo
if not a then
+print(">1",str,a)
a = resolve_predefined and predefined_simplified[str]
+print(">2",str,a)
if a then
-- one of the predefined
elseif type(resolve) == "function" then
@@ -6701,15 +6703,20 @@ local function handle_any_entity(str)
else
a = entities[str]
end
+print(">3",str,a)
if a then
if type(a) == "function" then
- report_xml("expanding entity &%s; (function)",str)
+ if trace_entities then
+ report_xml("expanding entity &%s; (function)",str)
+ end
a = a(str) or ""
end
+print(">4",str,a)
+ a = lpegmatch(parsedentity,a) or a
+print(">5",str,a)
if trace_entities then
report_xml("resolved entity &%s; -> %s (internal)",str,a)
end
- a = lpegmatch(parsedentity,a) or a
else
local unknown_any_entity = placeholders.unknown_any_entity
if unknown_any_entity then
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index abd4f964c..d0cf3d46d 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -6693,7 +6693,9 @@ local function handle_any_entity(str)
if resolve then
local a = acache[str] -- per instance ! todo
if not a then
+print(">1",str,a)
a = resolve_predefined and predefined_simplified[str]
+print(">2",str,a)
if a then
-- one of the predefined
elseif type(resolve) == "function" then
@@ -6701,15 +6703,20 @@ local function handle_any_entity(str)
else
a = entities[str]
end
+print(">3",str,a)
if a then
if type(a) == "function" then
- report_xml("expanding entity &%s; (function)",str)
+ if trace_entities then
+ report_xml("expanding entity &%s; (function)",str)
+ end
a = a(str) or ""
end
+print(">4",str,a)
+ a = lpegmatch(parsedentity,a) or a
+print(">5",str,a)
if trace_entities then
report_xml("resolved entity &%s; -> %s (internal)",str,a)
end
- a = lpegmatch(parsedentity,a) or a
else
local unknown_any_entity = placeholders.unknown_any_entity
if unknown_any_entity then