Symptom
In Plain Text Mode, <hr> elements are removed from the output EPUB and
nothing is put in their place. In fiction they usually mark a scene break, so
two unrelated scenes end up running together as continuous prose.
Measurement
One book, 78 XHTML files: 416 <hr> elements in the source, 0 in the
translated output. No textual substitute either — no ---, *** or similar
line appears anywhere in the result.
They are load-bearing in this book. Two examples of what sits on either side
of one:
- a dialogue scene ends,
<hr>, then the character is packing in a different
place at a different time
- a scene ends,
<hr>, then the very next paragraph names a different POV
character and the narration switches to first person as someone else
The second case is the painful one: without the break the reader hits an "I"
that belongs to a different narrator and needs a paragraph or two to work out
what happened.
Cause
src/core/epub/plain_extractor.py:
BLOCK_TAGS = p, h1–h6, li, blockquote, pre — no hr
DROP_TAGS = svg, video, audio, iframe, form, script, style — no hr
CONTAINER_TAGS — no hr
So <hr> is never collected, and since the body is rebuilt from collected
blocks only, it disappears. It is not an explicit drop decision — it just
falls through.
Worth noting the comment right above DROP_TAGS: tables, figures and pictures
are deliberately not dropped, "otherwise that content would be silently
deleted from the output". A scene separator seems to fall under the same
principle.
Suggested direction
<hr> carries no text, so it does not need to reach the model. It only needs
to survive reassembly — e.g. treated as a void block that is re-emitted at its
original position, the way <img> elements are already anchored.
Config
- v1.5.4, Docker, Plain Text Mode enabled
- OpenRouter,
mistralai/mistral-medium-3.1, English → Russian
MAX_TOKENS_PER_CHUNK=1800, PARALLEL_TRANSLATIONS=1
Same book as #253, different problem — filing separately since the mechanism
is unrelated.
Symptom
In Plain Text Mode,
<hr>elements are removed from the output EPUB andnothing is put in their place. In fiction they usually mark a scene break, so
two unrelated scenes end up running together as continuous prose.
Measurement
One book, 78 XHTML files: 416
<hr>elements in the source, 0 in thetranslated output. No textual substitute either — no
---,***or similarline appears anywhere in the result.
They are load-bearing in this book. Two examples of what sits on either side
of one:
<hr>, then the character is packing in a differentplace at a different time
<hr>, then the very next paragraph names a different POVcharacter and the narration switches to first person as someone else
The second case is the painful one: without the break the reader hits an "I"
that belongs to a different narrator and needs a paragraph or two to work out
what happened.
Cause
src/core/epub/plain_extractor.py:BLOCK_TAGS=p, h1–h6, li, blockquote, pre— nohrDROP_TAGS=svg, video, audio, iframe, form, script, style— nohrCONTAINER_TAGS— nohrSo
<hr>is never collected, and since the body is rebuilt from collectedblocks only, it disappears. It is not an explicit drop decision — it just
falls through.
Worth noting the comment right above
DROP_TAGS: tables, figures and picturesare deliberately not dropped, "otherwise that content would be silently
deleted from the output". A scene separator seems to fall under the same
principle.
Suggested direction
<hr>carries no text, so it does not need to reach the model. It only needsto survive reassembly — e.g. treated as a void block that is re-emitted at its
original position, the way
<img>elements are already anchored.Config
mistralai/mistral-medium-3.1, English → RussianMAX_TOKENS_PER_CHUNK=1800,PARALLEL_TRANSLATIONS=1Same book as #253, different problem — filing separately since the mechanism
is unrelated.