Browse Source

Don't replace underscores in auto-generated IDs in goldmark (#12805)

Fix #12196

Signed-off-by: Andrew Thornton <art27@cantab.net>
for-closed-social
zeripath 4 years ago
committed by GitHub
parent
commit
f91bb745d6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/markup/common/footnote.go

+ 1
- 1
modules/markup/common/footnote.go View File

@ -34,7 +34,7 @@ func CleanValue(value []byte) []byte {
needsDash := false needsDash := false
for _, r := range rs { for _, r := range rs {
switch { switch {
case unicode.IsLetter(r) || unicode.IsNumber(r):
case unicode.IsLetter(r) || unicode.IsNumber(r) || r == '_':
if needsDash && len(result) > 0 { if needsDash && len(result) > 0 {
result = append(result, '-') result = append(result, '-')
} }

Loading…
Cancel
Save