mirror of
1
Fork 0
forgejo/modules/markup
forgejo-backport-action 89c4c9c477 [v10.0/forgejo] fix: render link in heading correctly in TOC (#6859)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/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.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6859
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-02-08 14:33:01 +00:00
..
asciicast Fix and refactor markdown rendering (#32522) 2024-11-17 20:34:28 +01:00
common [GITEA] test markdown CleanValue to prevent regression 2024-02-05 16:09:41 +01:00
console Construct screen 2024-09-06 20:24:51 +02:00
csv Fix and refactor markdown rendering (#32522) 2024-11-17 20:34:28 +01:00
external Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
markdown [v10.0/forgejo] fix: render link in heading correctly in TOC (#6859) 2025-02-08 14:33:01 +00:00
mdstripper chore: fix deprecation 2024-11-02 16:39:27 +01:00
orgmode Update module github.com/alecthomas/chroma/v2 to v2.15.0 (v10.0/forgejo) (#6553) 2025-01-14 21:40:06 +00:00
tests/repo/repo1_filepreview [v10.0/forgejo] fix inline file preview for files with encoded URL, fix #5069 (#6739) 2025-01-30 11:49:16 +00:00
camo.go Use camo.Always instead of camo.Allways (#32097) 2024-09-27 08:45:55 +02:00
camo_test.go Use camo.Always instead of camo.Allways (#32097) 2024-09-27 08:45:55 +02:00
file_preview.go [v10.0/forgejo] fix inline file preview for files with encoded URL, fix #5069 (#6739) 2025-01-30 11:49:16 +00:00
html.go feat: Add partial quoting 2024-10-26 19:15:43 +02:00
html_internal_test.go fix: improve PR/issue short link display text 2024-08-22 15:49:05 -06:00
html_test.go [v10.0/forgejo] fix inline file preview for files with encoded URL, fix #5069 (#6739) 2025-01-30 11:49:16 +00:00
renderer.go [CHORE] Remove github.com/yuin/goldmark-meta 2024-07-07 03:18:13 +02:00
renderer_test.go
sanitizer.go fix: strict matching of allowed content for sanitizer 2024-11-15 10:59:36 +01:00
sanitizer_test.go feat: Add partial quoting 2024-10-26 19:15:43 +02:00