-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyperlinks in headers “leak” into header anchors #13405
Labels
Comments
bep
added a commit
to bep/hugo
that referenced
this issue
Feb 16, 2025
Merged
bep
added a commit
to bep/hugo
that referenced
this issue
Feb 16, 2025
bep
added a commit
to bep/hugo
that referenced
this issue
Feb 16, 2025
bep
added a commit
to bep/hugo
that referenced
this issue
Feb 17, 2025
…stinations (note) This makes the header ids match the newly added dt ids. Also make sure newlines are preserved in hooks' `.PlainText`. Fixes gohugoio#13405 Fixes gohugoio#13410
Yeah, the issue is fixed in Hugo 0.144.0, thank you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Previously reported on the Kayal theme repo, and then on the Hugo forum.
Related to #13401, #13404.
Describe the bug
Header anchors contain the destinations of hyperlinks in the header. This makes them long and unreadable.
This forces me to avoid hyperlinks in headers, which by themselves are functional.
Reproducible example
## Example [hyperlink](https://example.com/) in a header
generates
where the anchor at the right is
#example-hyperlinkhttpsexamplecom-in-a-header
Expected behavior
I expected a short and pretty anchor, containing only the visible text:
#example-hyperlink-in-a-header
The same as the one generated from a non-hyperlinked version of the same header:
## Example hyperlink in a header
Desktop (please complete the following information):
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes. Before reporting, I downloaded Hugo 0.143.1 from Github Releases and tried it too.
The text was updated successfully, but these errors were encountered: