diff options
author | zeripath <art27@cantab.net> | 2020-09-12 17:00:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 12:00:48 -0400 |
commit | f91bb745d6f64d7f8eb4d3270fe740911bce4251 (patch) | |
tree | 87c973bbc7585c7f52be1759c5b21ef69afca6ac /modules/markup/common | |
parent | 55e05ad1ce34b7d415743bc37455fc8af66e8453 (diff) | |
download | gitea-f91bb745d6f64d7f8eb4d3270fe740911bce4251.tar.gz gitea-f91bb745d6f64d7f8eb4d3270fe740911bce4251.zip |
Don't replace underscores in auto-generated IDs in goldmark (#12805)
Fix #12196
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/markup/common')
-rw-r--r-- | modules/markup/common/footnote.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/markup/common/footnote.go b/modules/markup/common/footnote.go index ad4cd7f2e1..9baf8a4998 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, '-') } |