texlive[55891] Master/texmf-dist: luaxml (20jul20)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 20 23:20:09 CEST 2020


Revision: 55891
          http://tug.org/svn/texlive?view=revision&revision=55891
Author:   karl
Date:     2020-07-20 23:20:09 +0200 (Mon, 20 Jul 2020)
Log Message:
-----------
luaxml (20jul20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/luaxml/README
    trunk/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf
    trunk/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex
    trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
    trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua

Modified: trunk/Master/texmf-dist/doc/luatex/luaxml/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luaxml/README	2020-07-20 21:19:47 UTC (rev 55890)
+++ trunk/Master/texmf-dist/doc/luatex/luaxml/README	2020-07-20 21:20:09 UTC (rev 55891)
@@ -28,7 +28,7 @@
 ------
 Michal Hoftich
 Email: michal.h21 at gmail.com
-Version: 0.1l, 2019-09-16
+Version: v0.1m, 2020-07-19
 
 Original authors: Paul Chakravarti and Manoel Campos (http://manoelcampos.com)
 

Modified: trunk/Master/texmf-dist/doc/luatex/luaxml/luaxml.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex	2020-07-20 21:19:47 UTC (rev 55890)
+++ trunk/Master/texmf-dist/doc/luatex/luaxml/luaxml.tex	2020-07-20 21:20:09 UTC (rev 55891)
@@ -7,7 +7,7 @@
 \usepackage{framed}
 % Version is defined in the makefile, use default values when compiled directly
 \ifdefined\version\else
-\def\version{0.1l}
+\def\version{v0.1m}
 \let\gitdate\date
 \fi
 \newcommand\modulename[1]{\subsection{#1}\label{sec:#1}}
@@ -99,6 +99,22 @@
 \end{luacode*}
 \end{framed}
 
+\subsection{Void elements}
+
+The \verb|DOM_Object.parse| function tries to support the HTML void elements,
+such as \verb|<img>| or \verb|<hr>|. They cannot have closing tags, a parse
+error occurs when the closing tags are used.
+
+It is possible to define a different set of void elements using the second parameter 
+for \verb|DOM_Object.parse|:
+
+\begin{verbatim}
+obj = dom.parse(document, {custom_void = true})
+\end{verbatim}
+
+An empty table will disable all void elements. This setting is recommended for common |xml| documents.
+
+
 \subsection{Node selection methods}
 There are some other methods for element retrieving. 
 

Modified: trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua	2020-07-20 21:19:47 UTC (rev 55890)
+++ trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua	2020-07-20 21:20:09 UTC (rev 55891)
@@ -115,8 +115,13 @@
     attributes["_text"] = nil
   elseif xtype == "DECL" and name =="xml" then
     -- the xml declaration attributes must be in a correct order
-    insert("<?xml version='%s' encoding='%s' ?>", attributes.version, attributes.encoding)
+    local encoding = attributes.encoding or "utf-8"
+    insert("<?xml version='%s' encoding='%s' ?>", attributes.version, encoding)
     return output
+  elseif xtype == "CDATA" then
+    -- return content unescaped
+    insert(string.format("<![CDATA[%s]]>", text_content))
+    return output
   end
 
   start(xtype, name, attributes)

Modified: trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua	2020-07-20 21:19:47 UTC (rev 55890)
+++ trunk/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua	2020-07-20 21:20:09 UTC (rev 55891)
@@ -1,3 +1,4 @@
+local utf8 = require "utf8"
 return {
 ["Subset"]="⋐",
 ["Chi"]="Χ",
@@ -39,7 +40,7 @@
 ["nsqsube"]="⋢",
 ["Nacute"]="Ń",
 ["mcomma"]="⨩",
-["ApplyFunction"]="⁡",
+["ApplyFunction"]=utf8.char(8289),
 ["rfisht"]="⥽",
 ["phmmat"]="ℳ",
 ["rarrw"]="↝",



More information about the tex-live-commits mailing list.