-
-
Notifications
You must be signed in to change notification settings - Fork 599
Description
Howdy,
Currently ordered lists expose which delimiter, .
or )
, was used when defining a list. I'd like to add functionality which does something similar for unordered lists. Such that the bullet-type is made available to the AST and/or output. So something consuming the AST or output could check for something like plus
, hyphen
, or asterisk
when +
, -
, or *
was used to construct the list.
Is that kind of functionality something that would be accepted upstream? I'm asking this first, because instead of adding this to cmark I could instead create an entirely separate pre-processor tool for our use case, but that would be non-ideal compared to adding support to cmark. Especially given that adding this would add balance to the current discrepancy in available AST detail between ordered and unordered lists.
If it is something that would have a chance at being accepted upstream, then there are two ways of implementing this that make sense to me.
-
Extending the existing
cmark_delim_type
incmark.h
to include additional delimiters for bullet-type, but that then makes this type cover more than its original intended function, which was clearly intended only for ordered lists. -
Creating an entirely new type such as
cmark_bullet_type
incmark.h
to represent the different unordered list bullet types, but then this adds a whole new data type to cmark.
Either of these methods will work, but I want to make sure the solution I pursue fits in with how the cmark maintainers would prefer the extra context/metadata be captured and represented.
Any guidance on any of the above would be very helpful.
Thank you.