easy-markdown-editor
easy-markdown-editor copied to clipboard
Parsing of nested lists
Hi,
I am using the classes added by CodeMirror to style lists in the edit mode.
CodeMirror adds a cm-formatting-list-ul
/ cm-formatting-list-ol
class to each list marker (+-*
).
This makes it very convenient to already style these list items in edit mode. However I noticed that these classes are only applied on the outermost level. E.g. in the example below, the *
before sub list item 1
won't get the cm-formatting-list-ul
class. If anyone could point me into any direction on how to get EasyMDE or CodeMirror to also parse these nested lists, that would be great!
- list item 1
- list item 2
* sub list item 1
* sub list item 2
You're mixing different characters in the list, it should work but I can imagine that would throw off CodeMirror.
Try:
* Fruit
* Apple
* Orange
* Banana
* Dairy
* Milk
* Cheese
However in my tests I did get the cm-formatting-list-ul
class on the nested list *
.