forgejo/modules/markup
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
..
asciicast
common
console
csv
external
markdown fix: render link in heading correctly in TOC (#6853) 2025-02-08 13:34:09 +00:00
mdstripper
orgmode
tests/repo/repo1_filepreview
camo.go
camo_test.go
file_preview.go
html.go
html_internal_test.go
html_test.go
renderer.go
renderer_test.go
sanitizer.go
sanitizer_test.go