Remove Forced Line Breaks messes up Page Navigation markers
When exporting as Reflowable EPUB with Page Navigation turned on, page markers need to be inserted immediately before the first word on the page. Often, this will be inside a paragraph.
However, in InDesign 21.2, is the "Remove Forced Line Breaks" option is turned on, the markers are only being placed as <div> tags and never as <span> tags. This means that the page break markers are only placed between block elements and never inside them, so they don't accurately reflect where the page breaks occur in the print layout.
Current export example:
<p>A full paragraph with a page break inside.</p>
<div aria-label="2" id="page2" role="doc-pagebreak"/>
<p>The next paragraph.</p>
Desired export example:
<p>A full paragraph with a <span aria-label="2" id="page2" role="doc-pagebreak"/>page break inside.</p>
<p>The next paragraph.</p>
To replicate:
1. Created a new file and fill with enough text for two pages.
2. Ensure there is a paragraph that breaks from one page to the next.
3. Export as EPUB (Reflowable) with both Page Navigation and Remove Forced Line Breaks turned on.
The page marker will be inserted as a <div> between paragraphs. Export with Remove Forced Line Breaks turned off, and the marker will be a <span> in the correct place.
Sample INDD attached.