From c2470308458b305ef4c1ab2d118e9f3965ac21cd Mon Sep 17 00:00:00 2001 From: eric Date: Sun, 9 Aug 2026 19:24:47 -0400 Subject: [PATCH] add aside The `aside` element is now allowed. becomes div[class=aside] in epub2. Addresses #321. --- CHANGES | 2 ++ src/ebookmaker/writers/EpubWriter.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 80145d0..69e4b91 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ 0.14.3 August ??, 2026 + +- The `aside` element is now allowed. becomes div[class=aside] in epub2. - handling of inline SVG has been improved. - the inline SVG element is now handled whether or not it has set the svg namespace. - inline SVG is changed to standalone files in EPUB2 diff --git a/src/ebookmaker/writers/EpubWriter.py b/src/ebookmaker/writers/EpubWriter.py index c4e973e..e083a2f 100644 --- a/src/ebookmaker/writers/EpubWriter.py +++ b/src/ebookmaker/writers/EpubWriter.py @@ -1078,7 +1078,8 @@ def fix_html5(xhtml): # replace html5 block tags usedtags = set() - for newtag in ['article', 'figcaption', 'figure', 'footer', 'header', 'section', 'nav', 'main']: + for newtag in ['article', 'figcaption', 'figure', 'footer', 'header', 'section', 'nav', + 'main', 'aside']: for tag in xpath(xhtml, f'//xhtml:{newtag}'): usedtags.add(newtag) tag.tag = NS.xhtml.div