Summary
A paragraph line ending immediately before raw HTML loses its break when the file is saved. The two lines merge into one and the break does not come back. This is content loss rather than normalization: the document after reopening is missing a node it had before.
Steps to reproduce
-
Open a document containing:
Paragraph text before a custom tag.
<garden-card data-bed="north">
-
Save it without editing.
-
Reopen the saved file.
Expected behavior
The break survives. The paragraph holds a text node, a hard break, and the raw HTML, as it did before the save.
Actual behavior
Measured against 9626471d by driving the editor mount used by the plugin tests:
- Saved:
Paragraph text before a custom tag. <garden-card data-bed="north">
- Before:
paragraph(text:"Paragraph text before a custom tag." hardbreak html)
- After:
paragraph(text:"Paragraph text before a custom tag. " html)
The hard break becomes a trailing space on the text node, and the node count drops.
corpus/commonmark/html.md carries this under Complete custom tags may not interrupt a paragraph, and it is why that file's document differs across one save.
Related context
Done when
Notes, logs, screenshots
This is none of the three identity-gap causes #135 measured, and corpusRoundTrip.test.tsx is green on it. Convergence cannot see it: the document is already damaged by the first save, and every pass after that is stable. It surfaced only because #245 compared documents rather than serialized bytes, which is worth carrying into the regression coverage above.
Diagnosis
Not established. The break survives parsing and is lost on serialization, but which handler drops it was not isolated.
Out of scope
- The table defect found alongside it, which is filed separately.
- Whether raw HTML should be a distinct node at all.
Summary
A paragraph line ending immediately before raw HTML loses its break when the file is saved. The two lines merge into one and the break does not come back. This is content loss rather than normalization: the document after reopening is missing a node it had before.
Steps to reproduce
Open a document containing:
Save it without editing.
Reopen the saved file.
Expected behavior
The break survives. The paragraph holds a text node, a hard break, and the raw HTML, as it did before the save.
Actual behavior
Measured against
9626471dby driving the editor mount used by the plugin tests:Paragraph text before a custom tag. <garden-card data-bed="north">paragraph(text:"Paragraph text before a custom tag." hardbreak html)paragraph(text:"Paragraph text before a custom tag. " html)The hard break becomes a trailing space on the text node, and the node count drops.
corpus/commonmark/html.mdcarries this underComplete custom tags may not interrupt a paragraph, and it is why that file's document differs across one save.Related context
Outcomesection of How a Markdown escape should be represented in the editor #245Done when
corpus/commonmark/html.mdpreserves its document across a save.Notes, logs, screenshots
This is none of the three identity-gap causes #135 measured, and
corpusRoundTrip.test.tsxis green on it. Convergence cannot see it: the document is already damaged by the first save, and every pass after that is stable. It surfaced only because #245 compared documents rather than serialized bytes, which is worth carrying into the regression coverage above.Diagnosis
Not established. The break survives parsing and is lost on serialization, but which handler drops it was not isolated.
Out of scope