From 6b955e239a975258c6db6e82d6281232e95360c8 Mon Sep 17 00:00:00 2001 From: Joseph Koshy <326115+jkoshy@users.noreply.github.com> Date: Sat, 6 Jun 2026 20:02:48 +0000 Subject: [PATCH 1/2] Fix typos. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47cb00a..6c5d97e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Ebookmaker is the tool used for format conversion at Project Gutenberg. It builds HTML5, EPUB2, EPUB3 and Kindle files (including KF8) from HTML. -It builds builds thes formats and PDF files from reST sources. +It builds these formats and PDF files from reST sources. If you are preparing HTML for use with Ebookmaker, the [Usage Notes](USAGE.md) may be of interest. From 34c514860c54cee9f1cdeb098963d9ae3b65e806 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 6 Aug 2026 13:52:09 -0400 Subject: [PATCH 2/2] support time element fixes #332 --- CHANGES | 2 ++ src/ebookmaker/writers/EpubWriter.py | 5 +++-- tests/files/43172/43172-h/43172-h.html | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index f3fb727..66b4bb6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +- support HTML5 `time` element. fixes #332 + 0.14.2 July 4, 2026 - `text-decoration` for `a` should be reset to `underline`, not initial. Fixes #316. diff --git a/src/ebookmaker/writers/EpubWriter.py b/src/ebookmaker/writers/EpubWriter.py index a1dd42b..9f18652 100644 --- a/src/ebookmaker/writers/EpubWriter.py +++ b/src/ebookmaker/writers/EpubWriter.py @@ -1047,7 +1047,8 @@ def fix_html5(xhtml): attrs_to_remove = [('*', 'role'), ('*', 'itemid'), ('*', 'itemprop'), ('*', 'itemref'), ('*', 'itemscope'), - ('*', 'itemtype'), ('ol', 'start'), ('li', 'value'), ('*', 'focusable')] + ('*', 'itemtype'), ('ol', 'start'), ('li', 'value'), ('*', 'focusable'), + ('time', 'datetime')] svgattrs_to_remove = [('*', 'role'), ('*', 'focusable')] @@ -1084,7 +1085,7 @@ def fix_html5(xhtml): writers.HTMLWriter.add_class(tag, newtag) # replace html5 inline tags - for newtag in ['u', 'ruby', 'rt', 'rp']: + for newtag in ['u', 'ruby', 'rt', 'rp', 'time']: for tag in xpath(xhtml, f'//xhtml:{newtag}'): usedtags.add(newtag) tag.tag = NS.xhtml.span diff --git a/tests/files/43172/43172-h/43172-h.html b/tests/files/43172/43172-h/43172-h.html index d92962e..ea4bf1c 100644 --- a/tests/files/43172/43172-h/43172-h.html +++ b/tests/files/43172/43172-h/43172-h.html @@ -382,9 +382,9 @@

Just testing

-Quella che si suole chiamare Rivoluzione dell'89, +Quella che si suole chiamare Rivoluzione dell'89, , non fu che una grande rivolta e un grande -delitto politico che servì ad aumentare una triste +delitto politico che servì ad aumentare una triste serie di comuni delitti; per cui chi vuol trattare dei suoi elementi criminosi dovrebbe rifarne tutta la storia; il che nè è mio cómpito, nè sarebbe