bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: texi to epub


From: Per Bothner
Subject: Re: texi to epub
Date: Sun, 19 Dec 2021 16:39:04 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 12/19/21 16:02, Patrice Dumas wrote:
It was much easier in the HTML converter.  It is actually a bit
cumbersome, but it works.  To use XML compatible syntax, it is possible
to use -c 'USE_XML_SYNTAX 1'.  It is also possible to use only numeric
entities, with -c 'USE_NUMERIC_ENTITY 1', to add xmlns to the <html>
element with -c 'HTML_ROOT_ELEMENT_ATTRIBUTES 
xmlns="http://www.w3.org/1999/xhtml";'.

From looking at the code (without any testing), it appears that all
calls to close_html_lone_element_if_needed pass a string that ends with ">".

A simplification might be to leave off the ">" in the argument, and instead
have close_html_lone_element_if_needed append either ">" or "/>" depending on
USE_XML_SYNTAX.

I would guess this might be slightly slower in the non-USE_XML_SYNTAX case
(an extra concatenation with ">") but faster in the USE_XML_SYNTAX case
(avoid the regex substitution), but neither likely to be measurable since I'm 
also
guessing it's not called that frequently.
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]