ProseMirror / prosemirror-markdown

ProseMirror Markdown integration
https://prosemirror.net
MIT License
345 stars 81 forks source link

Issue with hard breaks in headline #40

Closed buddh4 closed 4 years ago

buddh4 commented 4 years ago

When adding a hard break Ctrl+Enter within a headline the markdown result is:

## asdf\
asdf

Which will be rendered as:

grafik

My workaround was to use the splitBlock command in the Ctrl+Enter keymap if the selection resides within a headline.

marijnh commented 4 years ago

This was a mismatch between that ProseMirror's schema allowed and what the Markdown parser accepted—ProseMirror allowed hard breaks in title nodes, but CommonMark apparently forbids that. I've adjusted the schema in attached patch.

buddh4 commented 4 years ago

Works great, thanks!

marijnh commented 4 years ago

Great, published as 1.4.5