Open puzrin opened 7 years ago
Each node can have:
^____- [ ] some text↩
^--^ indent
^ bullet-list token
^ space
^____________^ list content
^ end of line (carriage return)
^_^ task-list token (todo)
A potential solution is:
AST:
[
<bullet-list-open toke-content="- " indent=" ">,
<inline>list content blah blah blah</inline>,
<bullet-list-close token-content="↩">
]
as long as this AST syntax is consistent it's fine. I don't know how other parsers do it but my guess is they either emphasize speed, easy of quick lookup, ease of consumption or storage space requirements.
I think if we stick with what markdonw-it uses now, incremental changes in the token array is going to allow current plug-ins to work.
but you might not want current plug-ins to work to force plug-in upgrade, so that they are more consistent. This is a general trade-off that you might need to consider. A plug-in compatibility warning might be enough to push people to go do it right though.
Problem
How to store this info in AST?
indent
Checklist