Repository navigation
fix(longform): preserve EPUB block element boundaries - #2631
rudycelekli wants to merge 3 commits into
Conversation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
|
All contributors on this pull request have signed the VoiceStudio CLA. Thank you! |
|
[Medium risk] Fixes EPUB text extraction to preserve block element boundaries. The PR appears safe to merge based on the reviewed parser changes. SummaryThe PR preserves EPUB block boundaries during audiobook import. The follow-up prevents void elements from adding a second line break and adds HTML and EPUB regressions. Reviews (2) · Last reviewed commit: "fix(longform): retain single breaks for ..." |
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe EPUB text extractor recognizes additional block elements and inserts boundaries around their content. Tests cover block and inline markup, heading and page-break handling, ChangesEPUB block-boundary handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to The EPUB boundary change has no identified issue requiring a fix before merge. Complete the normal required checks before release. 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 2 files. (2 skipped: 2 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks for the report and the work on this, @rudycelekli. The problem in #2630 is fixed on |
Summary
EPUB block endings can join surrounding narration without a word boundary. For example, text immediately following
</p>is appended to the preceding paragraph.Changes
Type
Testing
Hosted CI audit at 2026-10-06T12:35:20.584679+00:00: no failing latest checks; required CLA passes. All latest reported checks completed successfully. No upstream merge performed.
Native in-memory EPUB and HTML parser fixtures cover paragraph endings, headings, table cells, other block tags, inline emphasis and page-break controls.
Regression against unchanged main production source: 9 failed, 4 passed. After the fix: 13 passed; 26 with changelog gate.
Python 3.13 with
HF_HUB_OFFLINE=1and an empty Hugging Face cache. No model download or inference calls.Diff check and Python compilation pass.
Full backend/Electron suites were not run locally; focused tests alone do not establish hosted security or platform gates. Hosted results are reported separately below.
Review follow-up verification
<br>forms, and actual repacked EPUB fixtures verify a single internal line break while preserving paragraph-close boundaries. Four regressions fail before the follow-up; 32 parser/changelog tests pass afterward.Checklist
smoke-matrixCI — not run locallyCloses #2630
The EPUB importer now adds boundaries after block elements while preserving inline word fragments and excluding ignored page-break content. This prevents adjacent narration from joining without a word boundary. Focused parser tests passed, but full backend, Electron, hosted security, and platform validation remain unrun.