We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
7.5.0
https://milkdown.dev/playground?text=DISwdgpgBAjAUAupJQExyA%3D%3D
Currently, when users edit their posts, they are losing the spacing between paragraphs because of this.
The markdown that gets saved into the database.
Line 1 Line 2
Upon edit we load the markdown into Milkdown, using (same code as in the playground)
const editor = get(); editor?.action((ctx) => { const view = ctx.get(editorViewCtx); const parser = ctx.get(parserCtx); const doc = parser(markdown); if (!doc) return; const state = view.state; view.dispatch( state.tr.replace( 0, state.doc.content.size, new Slice(doc.content, 0, 0), ), ); });
Content becomes
Basically if I load again Milkdown's previous output, I won't get the same results again.
Empty nodes are preserved by the parser.
Empty node gets removed.
Chrome
Windows
Next.js
The text was updated successfully, but these errors were encountered:
face the same issue. @Saul-Mirone
Sorry, something went wrong.
Saul-Mirone
No branches or pull requests
Initial checklist
Affected packages and versions
7.5.0
Link to runnable example
https://milkdown.dev/playground?text=DISwdgpgBAjAUAupJQExyA%3D%3D
Steps to reproduce
Currently, when users edit their posts, they are losing the spacing between paragraphs because of this.
The markdown that gets saved into the database.
Upon edit we load the markdown into Milkdown, using (same code as in the playground)
Content becomes
Basically if I load again Milkdown's previous output, I won't get the same results again.
Expected behavior
Empty nodes are preserved by the parser.
Actual behavior
Empty node gets removed.
Runtime
Chrome
OS
Windows
Build and bundle tools
Next.js
The text was updated successfully, but these errors were encountered: