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

Fix goldmark toc rendering #6934

Merged
merged 5 commits into from Feb 22, 2020
Merged

Conversation

satotake
Copy link
Contributor

@satotake satotake commented Feb 22, 2020

Fixes #6736
Fixes #6809

Previously gordmark-based TOC renderes only KindText and KindString
This PR expands target node with goldmark's renderer

I am not sure of what are expected results as TOC contents in some (rare) cases
but Blackfriday's behaviours are fundamentally respected.
For example,

  • image such as [image text](link) is rendered as <img> tag
  • GFM AutoLink such as gohugo.io is rendered as text
    • Edit: my misunderstanding. Rendered as <a>

Fixes gohugoio#6736
Fixes gohugoio#6809

Previously gordmark-based TOC renderes only `KindText` and `KindString`
This PR expands target node with goldmark's renderer

I am not sure of what are expected results as TOC contents in some (rare) cases
but Blackfriday's behaviours are fundamentally respected.
For example,
- image `[image text](link)` is rendered as `<img>` tag
- GFM AutoLink `gohugo.io` is rendered as text
@bep bep added this to the 0.65.3 milestone Feb 22, 2020
@bep bep merged commit ca68abf into gohugoio:master Feb 22, 2020
@satotake satotake deleted the fix-goldmark-toc-rendering branch February 29, 2020 07:47
@github-actions
Copy link

This pull request 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 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Goldmark TOC is unescaped leading to invalid HTML output TOC doesn't contain <code> anymore (0.60)
2 participants