diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-02 23:03:30 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-02 23:03:30 +0200 |
commit | 2bca80bc96d0182956e57c51b5d4977f714bed5c (patch) | |
tree | e0edb360bc5de3067487bcbb31eb040f696e2853 /tex/context/base/mkiv/lxml-tab.lua | |
parent | a274872832cdd1e71ce4b019858c61c5a77c6b98 (diff) | |
download | context-2bca80bc96d0182956e57c51b5d4977f714bed5c.tar.gz |
2016-06-02 21:33:00
Diffstat (limited to 'tex/context/base/mkiv/lxml-tab.lua')
-rw-r--r-- | tex/context/base/mkiv/lxml-tab.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/lxml-tab.lua b/tex/context/base/mkiv/lxml-tab.lua index 2925af5f9..3c386b7a3 100644 --- a/tex/context/base/mkiv/lxml-tab.lua +++ b/tex/context/base/mkiv/lxml-tab.lua @@ -1049,9 +1049,13 @@ local grammar_unparsed_text = P { "preamble", -- maybe we will add settings to result as well -local function _xmlconvert_(data, settings) +local function _xmlconvert_(data,settings) settings = settings or { } -- no_root strip_cm_and_dt given_entities parent_root error_handler preparexmlstate(settings) + local preprocessor = settings.preprocessor + if data and data ~= "" and type(preprocessor) == "function" then + data = preprocessor(data,settings) or data -- settings.currentresource + end if settings.parent_root then mt = getmetatable(settings.parent_root) else |