AutoIdentifierOptions.GitHub should remove dots from anchor links #198

Closed
opened 2026-01-29 14:30:09 +00:00 by claunia · 5 comments
Owner

Originally created by @Jeavon on GitHub (Mar 9, 2018).

On GitHub ### Thing (v7.7.3+) produces a anchor of #thing-v773
However when using markdig we get a anchor of #thing-v7.7.3

So when AutoIdentifierOptions.GitHub is used the dots should be removed from the anchors

Originally created by @Jeavon on GitHub (Mar 9, 2018). On GitHub `### Thing (v7.7.3+)` produces a anchor of `#thing-v773` However when using markdig we get a anchor of `#thing-v7.7.3` So when AutoIdentifierOptions.GitHub is used the dots should be removed from the anchors
claunia added the invalid label 2026-01-29 14:30:09 +00:00
Author
Owner

@xoofx commented on GitHub (Mar 9, 2018):

this should be removed (typically all the links at scriban were generated with Markdig) and looking at the markdig code:

964538ec79/src/Markdig/Helpers/LinkHelper.cs (L100-L115)

it does keep only letter, digit, -, _ but I don't see any .

So not sure exactly how did you get your result?

@xoofx commented on GitHub (Mar 9, 2018): this should be removed (typically all the links at [scriban](https://github.com/lunet-io/scriban/blob/master/doc/builtins.md#array-functions) were generated with Markdig) and looking at the markdig code: https://github.com/lunet-io/markdig/blob/964538ec79270741463ba207fda6e151f527248e/src/Markdig/Helpers/LinkHelper.cs#L100-L115 it does keep only letter, digit, `-`, `_` but I don't see any `.` So not sure exactly how did you get your result?
Author
Owner

@Jeavon commented on GitHub (Mar 9, 2018):

@xoofx I'm not sure if I'm doing something wrong then, perhaps the attached helps?
image

@Jeavon commented on GitHub (Mar 9, 2018): @xoofx I'm not sure if I'm doing something wrong then, perhaps the attached helps? ![image](https://user-images.githubusercontent.com/1829920/37215430-d18a16f8-23af-11e8-8aa3-fb0f50c4309c.png)
Author
Owner

@Jeavon commented on GitHub (Mar 9, 2018):

Checked we weren't doing anything to the heading before passing into Markdig

image

@Jeavon commented on GitHub (Mar 9, 2018): Checked we weren't doing anything to the heading before passing into Markdig ![image](https://user-images.githubusercontent.com/1829920/37215732-b435702e-23b0-11e8-826a-577fa312268e.png)
Author
Owner

@xoofx commented on GitHub (Mar 9, 2018):

UseAdvancedExtensions().UseAutoIdentifiers(...) will not work as the extension is already added by UseAdvancedExtensions. Try to issue the UseAutoIdentifiers before

@xoofx commented on GitHub (Mar 9, 2018): `UseAdvancedExtensions().UseAutoIdentifiers(...)` will not work as the extension is already added by `UseAdvancedExtensions`. Try to issue the `UseAutoIdentifiers` before
Author
Owner

@Jeavon commented on GitHub (Mar 9, 2018):

That's got it, thanks so much @xoofx !

@Jeavon commented on GitHub (Mar 9, 2018): That's got it, thanks so much @xoofx !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#198