[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: texi to epub
From: |
Patrice Dumas |
Subject: |
Re: texi to epub |
Date: |
Mon, 20 Dec 2021 10:23:56 +0100 |
On Sun, Dec 19, 2021 at 04:39:04PM -0800, Per Bothner wrote:
> 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.
As importantly, the code is simpler with your suggestion. I implemented
it, thanks (I cannot access the GNU websites right now but I have a commit
ready).
--
Pat
- Re: texi to epub, (continued)
- Re: texi to epub, Jacob Bachmeyer, 2021/12/18
- Re: texi to epub, Jean-Christophe Helary, 2021/12/18
- Re: texi to epub, Gavin Smith, 2021/12/19
- Re: texi to epub, Patrice Dumas, 2021/12/19
- Re: texi to epub, Patrice Dumas, 2021/12/19
- Re: texi to epub, Per Bothner, 2021/12/19
- Re: texi to epub,
Patrice Dumas <=
Re: texi to epub, Per Bothner, 2021/12/15
Re: texi to epub, Patrice Dumas, 2021/12/19