Problem
read and export trim the whitespace at the edge of a marked span, and the space is not put back outside the marks, so the words either side of the span's end run together on the next publish. Found by the table property test in #55, on a real page.
Reproduced 2026-09-25 (read → publish):
| storage |
read writes |
publish sends |
<p><strong>bold </strong>next</p> |
**bold**next |
<p><strong>bold</strong>next</p> |
<p><em>x </em>y</p> |
*x*y |
<p><em>x</em>y</p> |
<p><del>lost for </del>13.5h</p> |
~~lost for~~13.5h |
<p><del>lost for</del>13.5h</p> |
The last row is from a real incident table in a personal space: the page shows "…features for13.5h" after a read → update cycle. The Markdown is a fixed point after the first cycle, so no round-trip test notices. It affects every paragraph, not only tables. The Confluence editor produces this shape readily, since a space typed at the end of a bold run stays inside the run.
Notes
- Trimming is right, since CommonMark refuses
**bold ** as emphasis (a closing delimiter preceded by whitespace does not close). The fix is to move the trimmed whitespace outside the delimiters: **bold** next. The same goes for a leading space: <strong> bold</strong> should become **bold**.
coalesceSplitMarks in storage_to_md.go handles a related editor shape (a mark split around a link); the fix probably belongs near where marks are rendered in renderInline.
Problem
readandexporttrim the whitespace at the edge of a marked span, and the space is not put back outside the marks, so the words either side of the span's end run together on the next publish. Found by the table property test in #55, on a real page.Reproduced 2026-09-25 (read → publish):
<p><strong>bold </strong>next</p>**bold**next<p><strong>bold</strong>next</p><p><em>x </em>y</p>*x*y<p><em>x</em>y</p><p><del>lost for </del>13.5h</p>~~lost for~~13.5h<p><del>lost for</del>13.5h</p>The last row is from a real incident table in a personal space: the page shows "…features for13.5h" after a read → update cycle. The Markdown is a fixed point after the first cycle, so no round-trip test notices. It affects every paragraph, not only tables. The Confluence editor produces this shape readily, since a space typed at the end of a bold run stays inside the run.
Notes
**bold **as emphasis (a closing delimiter preceded by whitespace does not close). The fix is to move the trimmed whitespace outside the delimiters:**bold** next. The same goes for a leading space:<strong> bold</strong>should become**bold**.coalesceSplitMarksinstorage_to_md.gohandles a related editor shape (a mark split around a link); the fix probably belongs near where marks are rendered inrenderInline.