Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🐛 Do not crash if get_enclosing_chapter returns nil #471

Closed

Conversation

someth2say
Copy link
Contributor

@someth2say someth2say commented Apr 30, 2024

Fixes #470

Probably not the best approach, but enough to protect from the crash.

@mojavelinux
Copy link
Member

Could we modify get_enclosing_chapter so that if it hits the inner document of an AsciiDoc table cell that it continues looking above that? This is related to (but not limited by) the point made in asciidoctor/asciidoctor#4380.

You can find an example of accessing the parent document from a table cell here:

@mojavelinux
Copy link
Member

Please lock gepub to 1.0.15 instead as 1.0.16 is clearly broken.

@mojavelinux
Copy link
Member

In order for this to be merged, the code needs to find the chapter when starting from an AsciiDoc table cell, not just skip it. Otherwise, the metadata won't be right.

@slonopotamus
Copy link
Contributor

I don't see how to fix this without asciidoctor/asciidoctor#4380. See #473 for an ugly workaround.

slonopotamus added a commit to slonopotamus/asciidoctor-epub3 that referenced this pull request May 12, 2024
slonopotamus added a commit to slonopotamus/asciidoctor-epub3 that referenced this pull request May 12, 2024
@slonopotamus
Copy link
Contributor

WRT gepub issue, see #474 and skoji/gepub#140 (comment)

@slonopotamus slonopotamus added this to the next milestone May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not crash when adding an image inside a table cell
3 participants