gettalong / kramdown

kramdown is a fast, pure Ruby Markdown superset converter, using a strict syntax definition and supporting several common extensions.
http://kramdown.gettalong.org
Other
1.72k stars 274 forks source link

Make initial list label available for processor #740

Closed cabo closed 2 years ago

cabo commented 2 years ago

Making the initial list label available to the processor enables implementing behaviors such as deriving a starting number from the initial label. (This should not impact any existing code.)

gettalong commented 2 years ago

Thanks!

cabo commented 2 years ago

I specifically need the first label of the list (so I put it on the list).
But putting a label on each item would only insignificantly increase the amount of code needed.

gettalong commented 2 years ago

Hmm... okay, then we will only use the first one and if need be add the change for the others.

One thing to change, though: Could you name it :first_list_marker? In the syntax documentation it is always called "list marker" and since it is the first one and not something else, it should also have "first" somewhere in its name.

cabo commented 2 years ago

I pushed an update with :first_list_marker.

gettalong commented 2 years ago

Thanks for the changes - I will do a release for this in the near future.

gettalong commented 2 years ago

Thanks - I have cherry-picked the commit!