You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Markdown export breaks bold, italic and strikethrough when the styled text starts with a space #3232
blocksToMarkdownLossy puts the emphasis delimiters directly around styled text, even when that text starts with a space. A Markdown opening delimiter followed by whitespace doesn't count as emphasis, so the output shows literal asterisks in any CommonMark/GFM renderer, and BlockNote's own Markdown parser reads it wrong as well.
This happens often in practice: selecting a word together with the space before it (for example, by dragging or with Shift+Ctrl+Left) and pressing Ctrl+B produces a text run like " world" with bold: true.
Trailing whitespace is already moved outside **/*. Leading whitespace is not, and strikethrough has no whitespace handling at all.
If you parse that output back with tryParseMarkdownToBlocks, the styles are lost or land on the wrong text, and literal */~~ characters stay in the document.
Activity