benrbray / noteworthy

Markdown editor with bidirectional links and excellent math support, powered by ProseMirror. (In Development!)
https://noteworthy.ink
GNU Affero General Public License v3.0
234 stars 14 forks source link

[Markdown] Pro / Con Lists #12

Open benrbray opened 3 years ago

benrbray commented 3 years ago

The transition from markdown-it to remark required temporarily disabling pro/con lists. Restoring them will require a custom extension to mdast that reads the listItemMarker tokens produced by micromark, and adds them to the mdast syntax trees.

Based on the code at mdast-util-from-markdown, it looks like mdast plugins can override existing node enter/exit handlers.

winter
+ snowmen
+ sledding
- cold
- dark
benrbray commented 3 years ago

This should have been fixed by my remark-concrete plugin added by #13 . The corresponding test cases pass. At the moment, pro/con lists are parsed/serialized correctly, but any new pro/con lists created in the ProseMirror editor are serialized as regular lists. Needs further investigation.