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

TableOfContents doesn't output en/em dashes for -- and --- #6592

Closed
tangiel opened this issue Dec 9, 2019 · 1 comment · Fixed by #6603
Closed

TableOfContents doesn't output en/em dashes for -- and --- #6592

tangiel opened this issue Dec 9, 2019 · 1 comment · Fixed by #6603
Milestone

Comments

@tangiel
Copy link
Contributor

@tangiel tangiel commented Dec 9, 2019

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

$ hugo version
Hugo Static Site Generator v0.60.1/extended darwin/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?

Yes

If you have double/triple dashes in your header, they render correctly in .Content but no character is output in .TableOfContents. For example, "July 2019--September 2019" becomes "July 2019September 2019" in .TableOfContents. Easy workaround is to use the unicode dashes in the Markdown, but I personally prefer not to.

@tangiel

This comment has been minimized.

Copy link
Contributor Author

@tangiel tangiel commented Dec 10, 2019

The basic issue here appears to be that goldmark inserts the typographied text as string nodes and the ToC builder only appends Text node text. It's simple enough to add a KindString case, but I don't know that the solution is sufficiently comprehensive.

tangiel added a commit to tangiel/hugo that referenced this issue Dec 10, 2019
@bep bep added this to the v0.60.2 milestone Dec 10, 2019
@bep bep closed this in #6603 Dec 10, 2019
bep added a commit that referenced this issue Dec 10, 2019
@bep bep modified the milestones: v0.60.2, v0.61 Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.