diff options
author | Karl Berry <karl@freefriends.org> | 2018-02-28 23:46:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-02-28 23:46:36 +0000 |
commit | 1218a8f71bfc4d59b07360b0a83aaf8de831d117 (patch) | |
tree | 9fb4f0c57c1bd83e6fdddeaa70cb6c6825cf3289 /Master/texmf-dist | |
parent | 9e7da4a10152b2d4e13563fd86ec830328532014 (diff) |
luaxml (28feb18)
git-svn-id: svn://tug.org/texlive/trunk@46768 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luaxml/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf | bin | 98307 -> 98298 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luaxml/luaxml.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua | 7 |
4 files changed, 7 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaxml/README b/Master/texmf-dist/doc/luatex/luaxml/README index 3f80c181f2d..4017d861b84 100644 --- a/Master/texmf-dist/doc/luatex/luaxml/README +++ b/Master/texmf-dist/doc/luatex/luaxml/README @@ -29,7 +29,7 @@ Author ------ Michal Hoftich Email: michal.h21@gmail.com -Version: 0.1a +Version: 0.1b Original authors: Paul Chakravarti and Manoel Campos (http://manoelcampos.com) diff --git a/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf b/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf Binary files differindex 529228ec8d8..33051ab1c8b 100644 --- a/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf +++ b/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf diff --git a/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex b/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex index 1338c3e275b..bd6728e691b 100644 --- a/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex +++ b/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex @@ -7,7 +7,7 @@ \usepackage{framed} % Version is defined in the makefile, use default values when compiled directly \ifdefined\version\else -\def\version{0.1a} +\def\version{0.1b} \let\gitdate\date \fi \newcommand\modulename[1]{\subsection{#1}\label{sec:#1}} diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua index 46be64803b3..21f67a6f4ed 100644 --- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua +++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua @@ -103,7 +103,7 @@ local function serialize_dom(parser, current,level, output) text_content = text_content:gsub('"nil"','') text_content = text_content:gsub('%s*$','') attributes = {} - elseif xtype == "ELEMENT" and void[name] then + elseif xtype == "ELEMENT" and void[name] and #current._children < 1 then local format = get_action(xtype, "void") insert(format, name, prepare_attributes(attributes)) return output @@ -238,6 +238,7 @@ local parse = function( ) local current = current or self local text = {} + if current:is_text() then return current._text or "" end for _, el in ipairs(current:get_children()) do if el:is_text() then text[#text+1] = el._text or "" @@ -314,7 +315,9 @@ local parse = function( return el._parent end - --- Execute function on the current element and all it's children elements + --- Execute function on the current element and all it's children elements. + -- The traversing of child elements of a given node can be disabled when the executed + -- function returns false. -- @return nothing function DOM_Object:traverse_elements( fn, --- function which will be executed on the current element and all it's children |