Open tysongach opened 1 week ago
Could you try options: { extension: { header_ids: nil } }
?
@gjtorikian Yep, that removed the anchors for me. Thank you! I wonder if that should be the default?
Yes, I’m having a big think about defaults at the moment. Actually #315 is a more general bug around the issue you faced with autolink: false
. Apparently, the defaults aren’t getting merged correctly, and no one has noticed until now!
Hello,
I’ve just installed the gem into a Rails app and without passing in any options, Commonmarker is generating HTML headings with an anchor link inside of them:
I was expecting this:
The output is surprising to me because there is no mention of these anchors in the CommonMark spec or in the GitHub Flavored Markdown spec.
If you put the example above into the playground/interactive dingus on the CommonMark website, it outputs what I was expecting:
If you disable the
autolink
extension, the anchor is not generated:However, autolinking is something I do want. Is there a way to disable these heading anchor from being generated, while retaining the standard autolink functionality?
Thanks in advance!