asciidoctor / asciidoctor-epub3

:blue_book: Asciidoctor EPUB3 is a set of Asciidoctor extensions for converting AsciiDoc to EPUB3
https://asciidoctor.org
MIT License
216 stars 67 forks source link

Do not crash when adding an image inside a table cell #470

Closed someth2say closed 5 months ago

someth2say commented 6 months ago

A minimal reproducer would be:

|===
a|
image::image.svg[]
|===

If trying to generate the ePub leads to a crash:

$ asciidoctor-epub3 book.adoc
undefined method `attr?' for nil:NilClass

The reason is that the method get_enclosing_chapter returns nil when inside a table cell document.