mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
markup/goldmark: Make auto IDs GitHub compatible
You can turn off this behaviour: ```toml [markup] [markup.goldmark] [markup.goldmark.parser] autoHeadingIDAsciiOnly = true ``` Note that the `anchorize` now adapts its behaviour depending on the default Markdown handler. Fixes #6616
This commit is contained in:
@@ -25,7 +25,6 @@ import (
|
||||
"github.com/gohugoio/hugo/common/urls"
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
_errors "github.com/pkg/errors"
|
||||
"github.com/russross/blackfriday"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
@@ -90,7 +89,7 @@ func (ns *Namespace) Anchorize(a interface{}) (string, error) {
|
||||
if err != nil {
|
||||
return "", nil
|
||||
}
|
||||
return blackfriday.SanitizedAnchorName(s), nil
|
||||
return ns.deps.ContentSpec.SanitizeAnchorName(s), nil
|
||||
}
|
||||
|
||||
// Ref returns the absolute URL path to a given content item.
|
||||
|
Reference in New Issue
Block a user