Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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) #7235

Open
vadimkantorov opened this issue Feb 22, 2025 · 1 comment
Labels

Comments

@vadimkantorov
Copy link

vadimkantorov commented Feb 22, 2025

Image

Image


Somehow javascript got added (probably as default highlighting language, but it's potentially very wrong) and also an empty newline got added after Hello

Image


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

@vadimkantorov vadimkantorov changed the title Bug: markdown triple-backticks blocks get JavaScript lang-specifier added automatically after a markdown conversion rountdtrip (even when the content has not relation to JavaSCript) 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) Feb 22, 2025
@vadimkantorov
Copy link
Author

vadimkantorov commented Feb 26, 2025

The new setting Preserve newlines in Markdown in v0.25.0 playground

Image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants