Headline IDs without reserved-CSS characters #552

Closed
opened 2026-01-29 14:39:33 +00:00 by claunia · 2 comments
Owner

Originally created by @Mrks83 on GitHub (Aug 30, 2022).

Markdig generates IDs that might contain a . character. This is not optimal (see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id#sect2).

Would be nice to be able to escape . (and other characters reserved in css +, ~, !), too.

image

Originally created by @Mrks83 on GitHub (Aug 30, 2022). Markdig generates IDs that might contain a `.` character. This is not optimal (see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id#sect2). Would be nice to be able to escape `.` (and other characters reserved in css `+`, `~`, `!`), too. ![image](https://user-images.githubusercontent.com/5073749/187362236-047979fe-730e-43cb-a08f-d201f60e64ca.png)
claunia added the question label 2026-01-29 14:39:33 +00:00
Author
Owner

@xoofx commented on GitHub (Aug 30, 2022):

I think that originally, the default generated IDs was following pandoc (see the output here)

But you can configure the AutoIdentifier extension directly and use AutoIdentifierOptions.GitHub instead.

@xoofx commented on GitHub (Aug 30, 2022): I think that originally, the default generated IDs was following pandoc (see the output [here](https://babelmark.github.io/?text=%23%23+Release+1.1)) But you can configure the AutoIdentifier extension directly and use `AutoIdentifierOptions.GitHub` instead.
Author
Owner

@Mrks83 commented on GitHub (Aug 31, 2022):

Thanks for the AutoIdentifierOptions.GitHub hint, that helps and works exactly as proposed.

@Mrks83 commented on GitHub (Aug 31, 2022): Thanks for the `AutoIdentifierOptions.GitHub` hint, that helps and works exactly as proposed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#552