-
-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surfacing the list bullet marker type #225
Comments
Having now partially implemented both options 1 and 2 above I have some thoughts about their respective impacts. Option 1: Fits in with the cmark project structure and architecture of the parser and various output format generators as they exist today. Option 2: Seems more logically intuitive in the abstract, but is a bit more baroque when actually trying to integrate the change in cmark. As a result I'm currently more inclined to go for Option 1 unless otherwise influenced. |
I've nearly got a PR ready for Option 1. All tests pass and I added an additional "api" test to the suite. I've also updated the racket-lang wrapper and validated that when doing The only oddity is the Probably the proper way to handle this would be to remove I'll see how invasive that looks. |
Per the usual... upon completing my first go-around on it I found a much simpler way to implement this using the data that's already loaded into the The simpler method ameliorates the need for any changes to |
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 likeplus
,hyphen
, orasterisk
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.
The text was updated successfully, but these errors were encountered: