fix: always adding new line in code block #90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/code-block-ends-with-new-line"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If a code block ends with an empty line, a new line will not be added to the state
https://github.com/ProseMirror/prosemirror-markdown/blob/master/src/to_markdown.ts#L74
But when parsing markdown, the new line will be removed
https://github.com/ProseMirror/prosemirror-markdown/blob/master/src/from_markdown.ts#L116
This causes the issue that content before and after parsing will be different
Example:
Current version
After new change
Thanks!