Some editor formatting tools apply correctly in the editor but are silently lost when the document is serialized to Markdown.
Affected tools:
- Highlight / text color
- Superscript
- Subscript
- Text alignment
Root cause:
These marks/attributes have no Markdown serialization handlers registered in the PM→MD conversion pipeline (pmToMdConverter.ts). The code explicitly skips them:
console.warn('Unsupported mark type for markdown: ' + mark.type.name + ...);
— DocumentMarkdownInlineTokenizer.ts ~L271
The extensions define DOM parsing (<mark>, <sup>, <sub>, <p style="text-align:...">) but never register markdown token handlers, so the marks are silently dropped during serialization.
Expected:
Formatting applied with these tools persists through save/reload (markdown round-trip).
Actual:
Formatting appears in the editor but is lost on the next load because the markdown serializer has no representation for these marks.
Possible approaches:
- Extended markdown syntax (e.g.
==highlight==, ^superscript^, ~subscript~) with matching parser support
- HTML passthrough (e.g.
<mark>, <sup>, <sub>) preserved in the markdown output
Some editor formatting tools apply correctly in the editor but are silently lost when the document is serialized to Markdown.
Affected tools:
Root cause:
These marks/attributes have no Markdown serialization handlers registered in the PM→MD conversion pipeline (
pmToMdConverter.ts). The code explicitly skips them:The extensions define DOM parsing (
<mark>,<sup>,<sub>,<p style="text-align:...">) but never register markdown token handlers, so the marks are silently dropped during serialization.Expected:
Formatting applied with these tools persists through save/reload (markdown round-trip).
Actual:
Formatting appears in the editor but is lost on the next load because the markdown serializer has no representation for these marks.
Possible approaches:
==highlight==,^superscript^,~subscript~) with matching parser support<mark>,<sup>,<sub>) preserved in the markdown output