lexical
lexical copied to clipboard
Bug: markdown triple-backticks blocks get JavaScript lang-specifier added automatically after a markdown import-export rountdtrip (even when the content has not relation to JavaScript)
Somehow javascript got added (probably as default highlighting language, but it's potentially very wrong) and also an empty newline got added after Hello
As much of original Markdown should be preserved during import-export roundtrips, especially if the content were not edited. This would enable clean diffs when markdown being edited is under source/version control
The new setting Preserve newlines in Markdown in v0.25.0 playground
solves the extra-newline appearing (might be nice to have it enabled by default), but the javascript lang-specifier still appears in v0.25.0.
IMO the less markdown changes during import-export roundtrips - the better for markdown files editing WYSIWYG experience (as it keeps the diff clean). Maybe the most radical way for this would be to store the original markdown during import in the nodes, and if they were not edited - to emit the original markdown for them.