mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
Fix goldmark toc rendering
Previously gordmark-based TOC renderes only `KindText` and `KindString` This commit 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 * Render AutoLink as <a> tag as Blackfriday does Fixes #6736 Fixes #6809
This commit is contained in:
parent
a524124beb
commit
ca68abf0bc
4 changed files with 99 additions and 15 deletions
|
@ -1136,7 +1136,7 @@ TOC: {{ .TableOfContents }}
|
|||
"NEW INLINE: W1: [1 2 3 4 5]",
|
||||
"INLINE IN INNER: Inner: W2: [1 2 3 4]",
|
||||
"REUSED INLINE IN INNER: Inner: W1: [1 2 3]",
|
||||
`<li><a href="#markdown-delimiter-hugo-rocks">MARKDOWN DELIMITER: Hugo Rocks!</a></li>`,
|
||||
`<li><a href="#markdown-delimiter-hugo-rocks">MARKDOWN DELIMITER: <strong>Hugo Rocks!</strong></a></li>`,
|
||||
}
|
||||
|
||||
if enableInlineShortcodes {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue