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:
Bjørn Erik Pedersen
2025-02-16 21:52:46 +01:00
parent a2ca95629a
commit 24cc25552f
6 changed files with 59 additions and 14 deletions

View File

@@ -239,12 +239,12 @@ title: p7 (emoji)
// image
b.AssertFileContent("public/p3/index.html", `
<li><a href="#an-image-kittenajpg">An image <img src="a.jpg" alt="kitten" /></a></li>
<li><a href="#an-image-kitten">An image <img src="a.jpg" alt="kitten" /></a></li>
`)
// raw html
b.AssertFileContent("public/p4/index.html", `
<li><a href="#some-spanrawspan-html">Some <span>raw</span> HTML</a></li>
<li><a href="#some-raw-html">Some <span>raw</span> HTML</a></li>
`)
// typographer