mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Fix auto generated header ids so they don't contain e.g. hyperlink destinations (note)
This makes the header ids match the newly added dt ids. Also make sure newlines are preserved in hooks' `.PlainText`. Fixes #13405 Fixes #13410
This commit is contained in:
@@ -47,10 +47,12 @@ foo [something](/a/b/) bar
|
||||
Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď
|
||||
: Testing accents.
|
||||
|
||||
Mutiline set text header
|
||||
Multiline set text header
|
||||
Second line
|
||||
---------------
|
||||
|
||||
## Example [hyperlink](https://example.com/) in a header
|
||||
|
||||
-- layouts/_default/single.html --
|
||||
{{ .Content }}|Identifiers: {{ .Fragments.Identifiers }}|
|
||||
`
|
||||
@@ -68,7 +70,8 @@ Second line
|
||||
`<dt id="my-title-1">My Title</dt>`,
|
||||
`<dt id="term">良善天父</dt>`,
|
||||
`<dt id="a-a-a-a-a-a-c-c-c-c-c-c-c-c-d">Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď</dt>`,
|
||||
`<h2 id="second-line">Mutiline set text header`,
|
||||
"|Identifiers: [a-a-a-a-a-a-c-c-c-c-c-c-c-c-d base-name base-name-1 foo-something-bar foobar my-title my-title-1 second-line term title-with-id title-with-id]|",
|
||||
`<h2 id="second-line">`,
|
||||
`<h2 id="example-hyperlink-in-a-header">`,
|
||||
"|Identifiers: [a-a-a-a-a-a-c-c-c-c-c-c-c-c-d base-name base-name-1 example-hyperlink-in-a-header foo-something-bar foobar my-title my-title-1 second-line term title-with-id title-with-id]|",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user