From f91bb745d6f64d7f8eb4d3270fe740911bce4251 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 12 Sep 2020 17:00:48 +0100 Subject: [PATCH] Don't replace underscores in auto-generated IDs in goldmark (#12805) Fix #12196 Signed-off-by: Andrew Thornton --- modules/markup/common/footnote.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/markup/common/footnote.go b/modules/markup/common/footnote.go index ad4cd7f2e16..9baf8a4998b 100644 --- a/modules/markup/common/footnote.go +++ b/modules/markup/common/footnote.go @@ -34,7 +34,7 @@ func CleanValue(value []byte) []byte { needsDash := false for _, r := range rs { switch { - case unicode.IsLetter(r) || unicode.IsNumber(r): + case unicode.IsLetter(r) || unicode.IsNumber(r) || r == '_': if needsDash && len(result) > 0 { result = append(result, '-') }