asciidoctor-epub3 icon indicating copy to clipboard operation
asciidoctor-epub3 copied to clipboard

Roles on Admonitions Disappearing

Open niklucas opened this issue 2 years ago • 1 comments

If I use a role value to create a unique Admonition (similar to what's suggested in this issue in asciidoctor-pdf: https://github.com/asciidoctor/asciidoctor-extensions-lab/issues/9), that role value is not coming out in the resulting XHTML that's packaged within the epub file. It does work fine with the general HTML backend.

For example: [NOTE.references]

HTML: <div class="admonitionblock note references">

epub3 XHTML: <aside class="admonition note" title="Note" epub:type="notice">

Is there something additional that needs to be done to support this in asciidoctor-epub3?

niklucas avatar Jun 17 '22 19:06 niklucas

The EPUB3 converter tends not to honor the role on a block in general. You can see there is no reference to it in the convert handle for an admonition block: https://github.com/asciidoctor/asciidoctor-epub3/blob/main/lib/asciidoctor-epub3/converter.rb#L525-L553 There are only a few blocks where the role is honored. Given that the stylesheet is configurable, I would think that the EPUB3 converter probably should always honor the role.

mojavelinux avatar Jun 17 '22 19:06 mojavelinux