summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lxml-tex.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-01-17 18:05:46 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-01-17 18:05:46 +0100
commit0cfeab235554eeee0dddd6c3f44d3939ab490ff1 (patch)
treefed70e9a3332741e5294a01197c716dff8556506 /tex/context/base/mkiv/lxml-tex.lua
parent72d161c0a522fd92f32edd3588fa126c453f4a3d (diff)
downloadcontext-0cfeab235554eeee0dddd6c3f44d3939ab490ff1.tar.gz
2017-01-17 17:43:00
Diffstat (limited to 'tex/context/base/mkiv/lxml-tex.lua')
-rw-r--r--tex/context/base/mkiv/lxml-tex.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/tex/context/base/mkiv/lxml-tex.lua b/tex/context/base/mkiv/lxml-tex.lua
index c9675d435..fc86b9460 100644
--- a/tex/context/base/mkiv/lxml-tex.lua
+++ b/tex/context/base/mkiv/lxml-tex.lua
@@ -45,6 +45,7 @@ local xmltext = xml.text
local xmltostring = xml.tostring
local xmlapplylpath = xml.applylpath
local xmlunspecialized = xml.unspecialized
+local xmldespecialized = xml.despecialized -- nicer in expanded xml
local xmlprivatetoken = xml.privatetoken
local xmlstripelement = xml.stripelement
local xmlinclusion = xml.inclusion
@@ -53,6 +54,7 @@ local xmlbadinclusions = xml.badinclusions
local xmlcontent = xml.content
local xmllastmatch = xml.lastmatch
+
directives.enable("xml.path.keeplastmatch")
local variables = interfaces and interfaces.variables or { }
@@ -308,14 +310,6 @@ function lxml.stopraw()
forceraw = false
end
-function lxml.startraw()
- forceraw = true
-end
-
-function lxml.stopraw()
- forceraw = false
-end
-
function lxml.rawroot()
return rawroot
end
@@ -911,7 +905,8 @@ local function sprint(root) -- check rawroot usage
if forceraw then
rawroot = root
-- contextsprint(ctxcatcodes,xmltostring(root)) -- goes wrong with % etc
- root = xmlunspecialized(xmltostring(root))
+ -- root = xmlunspecialized(xmltostring(root)) -- we loose < > &
+ root = xmldespecialized(xmltostring(root))
lpegmatch(xmltextcapture,root) -- goes to toc
else
xmlserialize(root,xmltexhandler)