diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-01-04 11:28:19 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-01-04 19:46:01 +0100 |
commit | a82d2700fcc772aada15d65b8f76913ca23f7404 (patch) | |
tree | fa1c09eb1523d7cda303982b5c08661af9a194d6 /tpl | |
parent | ae816452b171b6b6aabca6a7423ed28a653baaa2 (diff) | |
download | hugo-a82d2700fcc772aada15d65b8f76913ca23f7404.tar.gz hugo-a82d2700fcc772aada15d65b8f76913ca23f7404.zip |
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
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/urls/urls.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tpl/urls/urls.go b/tpl/urls/urls.go index 5bae411b3..ee0e55501 100644 --- a/tpl/urls/urls.go +++ b/tpl/urls/urls.go @@ -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. |