gutenbergtools / ebookmaker

The Project Gutenberg tool to generate EPUBs and other ebook formats.
GNU General Public License v3.0
70 stars 17 forks source link

large child elements of body cause chunker to emit empty chunks #224

Closed eshellman closed 1 month ago

eshellman commented 1 month ago

The attached file contains 3 large divs as child elements of body. This causes the chunker to emit empty chunks, which cause the resulting epubs to fail validation.

An expedient but ugly workaround is to wrap the entire body contents in a div, which is a hack that the chunker uses for "pathological" single child bodys. The hack results in gratuitous page breaks. We need to teach the chunk to deal with nesting more GuideForThePerplexed.zip gracefully.