feat(export): add missing chapter placeholder rendering - #151
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a new configuration option
render_missing_chapterand adds unified “missing chapter placeholder” support across TXT, EPUB, and HTML exporters.When a chapter is missing (e.g., inaccessible, unsubscribed, or not downloaded), and
render_missing_chapter = true, exporters now insert a placeholder section instead of silently skipping the chapter.This improves readability, prevents unnoticed gaps, and provides a consistent experience across formats.
Changes
render_missing_chapter: bool = truecontrols whether missing chapters should render a placeholder during export._xp_epub_missing_chapter()helper and integrated the logic into:_export_volume_epub_export_book_epub_xp_html_missing_chapter()helper and integrated into:_export_book_html_xp_txt_missing_chapter()helper and integrated into:_export_book_txtMotivation
Previously, missing or inaccessible chapters were silently omitted during export.
For long novels or novels with many paid chapters, this often resulted in:
By adding explicit placeholder rendering, users can immediately see where chapters are unavailable, making the exported files more complete and easier to navigate.
Related Issues
Fixes #148
Type of change