Skip to content
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

Strikethrough in markdown heading is not rendered in TOC entry #7169

Closed
jdheyburn opened this issue Apr 13, 2020 · 2 comments · Fixed by #11784
Closed

Strikethrough in markdown heading is not rendered in TOC entry #7169

jdheyburn opened this issue Apr 13, 2020 · 2 comments · Fixed by #11784

Comments

@jdheyburn
Copy link

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.68.3-157669A0/extended darwin/amd64 BuildDate: 2020-03-24T12:11:24Z

Does this issue reproduce with the latest release?

Yes

Given a heading that contains strikethrough markdown, and TableOfContents is being rendered, the title of the heading does not reflect the strikethrough markdown - whereas it does for strong and italic markdown.

Example of markdown:
## Spice Up Your ~~Life~~ Python :snake:

Appears in ToC as below.

incorrect-markdown-rendering-toc

Whereas it is rendered fine as a heading.

markdown-heading-render

@stale
Copy link

stale bot commented Aug 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Aug 16, 2020
@stale stale bot closed this as completed Sep 20, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 28, 2022
lyind added a commit to lyind/hugo that referenced this issue Dec 5, 2023
Configure the TOC (TableOfContents, toc.go) goldmark renderer to always
enable the Strikethrough extension. This allows handling ast.KindStrikethrough
within an AST node.

Fixes gohugoio#7169
Fixes gohugoio#8087
Fixes gohugoio#11783
lyind added a commit to lyind/hugo that referenced this issue Dec 7, 2023
Configure the TOC (TableOfContents, toc.go) goldmark renderer to always
enable the Strikethrough extension. This allows handling ast.KindStrikethrough
within an AST node.

Fixes gohugoio#7169
Fixes gohugoio#8087
Fixes gohugoio#11783
lyind added a commit to lyind/hugo that referenced this issue Feb 9, 2024
Configure the TOC (TableOfContents, toc.go) goldmark renderer to always
enable the Strikethrough extension. This allows handling ast.KindStrikethrough
within an AST node.

The last test in TestEscapeToc() is corrected to not expect <div>
elements to be included in the TOC renderer output.

Fixes gohugoio#7169
Fixes gohugoio#8087
Fixes gohugoio#11783
lyind added a commit to lyind/hugo that referenced this issue Feb 9, 2024
Configure the TOC (TableOfContents, toc.go) goldmark renderer to always
enable the Strikethrough extension. This allows handling ast.KindStrikethrough
within an AST node.

The last test in TestEscapeToc() is corrected to not expect <div>
elements to be included in the TOC renderer output.

Fixes gohugoio#7169
Fixes gohugoio#8087
Fixes gohugoio#11783
@jmooring jmooring reopened this Feb 9, 2024
@jmooring jmooring changed the title Strikethrough Markdown Not Reflected in ToC Heading Text Strikethrough in markdown heading is not rendered in TOC entry Feb 10, 2024
lyind added a commit to lyind/hugo that referenced this issue Feb 20, 2024
Configure the TOC (TableOfContents, toc.go) goldmark renderer to always
enable the Strikethrough and Emoji extensions. This allows handling
ast.KindStrikethrough and ast.KindEmoji AST nodes when rendering the TOC.

Fixes gohugoio#7169
Fixes gohugoio#11783
Fixes gohugoio#12022
@bep bep closed this as completed in #11784 Mar 7, 2024
bep pushed a commit that referenced this issue Mar 7, 2024
Configure the TOC (TableOfContents, toc.go) goldmark renderer to always
enable the Strikethrough and Emoji extensions. This allows handling
ast.KindStrikethrough and ast.KindEmoji AST nodes when rendering the TOC.

Fixes #7169
Fixes #11783
Fixes #12022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants