mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
756 stars 138 forks source link

[Feature Request]: Offer automatic header id as extension #178

Open N-R-K opened 2 years ago

N-R-K commented 2 years ago

Being able to link to a specific section is a really nice to have feature.

While searching for existing issues, I found this comment which makes me think that this feature request won't be very welcomed. But I'd like to ask you to reconsider, since as said, it's something that (IMO) has more pros than cons.

ec1oud commented 1 year ago

There's also an extended syntax to set the ID (not supported in md4c AFAIK): https://www.markdownguide.org/extended-syntax/#heading-ids

This idea is not as flexible as being able to surround any chunk of text (like a key phrase in a paragraph) with <a id="foo">...</a> tags, but AFAIK there's no markdown for that: only embedded html.

tim-gromeyer commented 1 year ago

If I understood it right you meant this PR. I have a fork containing this PR and a crash fix.