forgejo/modules/markup/markdown
Gusted fad28141fa fix: render link in heading correctly in TOC (#6853)
- When you use a link in a heading such as `# [Text](link)` (instead of the conventional `# Text`) the TOC should only show `Text` and not `[Text](link)`.
- Use the `mdutil.Text` to only get the text from actual text nodes and not the text that was provided in the markdown input.
- Regression of e2fddcf681
- Resolves forgejo/forgejo#6847
- Added integration test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6853
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-08 13:34:09 +00:00
..
callout
math
util
ast.go
color_util.go
color_util_test.go
convertyaml.go
goldmark.go
markdown.go
markdown_test.go Remove automatic alt text in markdown image rendering 2025-01-31 21:22:00 +00:00
meta.go
meta_test.go
prefixed_id.go
renderconfig.go
renderconfig_test.go
toc.go
transform_codespan.go
transform_heading.go fix: render link in heading correctly in TOC (#6853) 2025-02-08 13:34:09 +00:00
transform_image.go
transform_link.go
transform_list.go