bug in lists #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
In the demo, clear the plain textbox and type:
Then switch to WYSIWYM, then switch back, and you'll see
This means something completely different in markdown -- it's a list with lots of space between each entry.
As far as I can tell, there isn't a way to even make a bulleted list without lots of space between entries using the WYSIWYM mode.
View the difference via Github's Markdown Renderer:
VERSUS
item
another item
The same issue occurs with enumerated lists.
It seems that the markdown parser isn't setting the
tightattribute (which stores the difference between the two types of Markdown lists), which is likely the source of this problem. I haven't checked how the current version of markdown-it exposes that, but I guess it shouldn't be too hard to fix that. Want to try creating a patch?I figured out how it does; markdown-it has a "hidden" attribute that the Prosemirror parser is ignoring. See https://markdown-it.github.io/markdown-it/#Token.prototype.hidden for the docs about it. In particular,
Probably they used this approach as a sort of annoying hack to make their codebase easier to maintain...
Unsure.
Attached patch seems to fix this.
@marijnh where is this patch? 🤔.
Probably in the link right above my comment.
github.com/ProseMirror/prosemirror-markdown@64f7027973