Skip to content

Commit f91bb74

Browse files
authored
Don't replace underscores in auto-generated IDs in goldmark (#12805)
Fix #12196 Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent 55e05ad commit f91bb74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/markup/common/footnote.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func CleanValue(value []byte) []byte {
3434
needsDash := false
3535
for _, r := range rs {
3636
switch {
37-
case unicode.IsLetter(r) || unicode.IsNumber(r):
37+
case unicode.IsLetter(r) || unicode.IsNumber(r) || r == '_':
3838
if needsDash && len(result) > 0 {
3939
result = append(result, '-')
4040
}

0 commit comments

Comments
 (0)