diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-01-17 18:05:46 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-01-17 18:05:46 +0100 |
commit | 0cfeab235554eeee0dddd6c3f44d3939ab490ff1 (patch) | |
tree | fed70e9a3332741e5294a01197c716dff8556506 /tex/context/base/mkiv/lxml-tex.lua | |
parent | 72d161c0a522fd92f32edd3588fa126c453f4a3d (diff) | |
download | context-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.lua | 13 |
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) |