forgejo/modules/markup
forgejo-backport-action 440f38913e [v14.0/forgejo] fix(ui): improve rendering of commit links (#10613)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/10530

This commit changes the commit link rendering (link to a single commit,
a diff, a PR, etc):

1. If it is a link to something on the local instance:
  1.1. If it is to the same org and repo, the link is just e.g. the
  commit hash
  1.2. If it is to another repo, the link is the org/repo/commit hash
2. If the link is to another instance:
  The link is the domain/optional sub path/org/repo/commit hash

This change is made to keep the link as short as possible, while not
hiding that the link may go to an external instance.

Followup to !9146

Closes #10241

Co-authored-by: Beowulf <beowulf@beocode.eu>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10613
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2026-01-07 13:51:34 +01:00
..
asciicast chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
common fix various typos (#7690) 2025-04-28 06:46:29 +00:00
console Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
csv Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
external chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
markdown [v14.0/forgejo] Add to html button in markdown type="button" (#10527) 2025-12-22 00:29:08 +01:00
mdstripper Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
orgmode Update module github.com/alecthomas/chroma/v2 to v2.20.0 (forgejo) (#8783) 2025-08-06 01:30:20 +02:00
tests/repo/repo1_filepreview fix inline file preview for files with encoded URL, fix #5069 (#6525) 2025-01-30 08:20:05 +00:00
camo.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
camo_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
file_preview.go feat(ui): improve multiline file preview and anchor detection (#9145) 2025-09-04 22:51:22 +02:00
html.go [v14.0/forgejo] fix(ui): improve rendering of commit links (#10613) 2026-01-07 13:51:34 +01:00
html_internal_test.go [v14.0/forgejo] fix(ui): improve rendering of commit links (#10613) 2026-01-07 13:51:34 +01:00
html_test.go [v14.0/forgejo] fix(ui): improve rendering of commit links (#10613) 2026-01-07 13:51:34 +01:00
renderer.go fix: use scrollHeight for rendered iframe if offsetHeight is unavailable (#9508) 2025-10-16 15:51:57 +02:00
renderer_test.go fix: markup rendering panic must not abort the process (#9478) 2025-09-30 09:39:34 +02:00
sanitizer.go [v14.0/forgejo] Add to html button in markdown type="button" (#10527) 2025-12-22 00:29:08 +01:00
sanitizer_test.go fix(ui): add missing lazy load attribute to images (#8246) 2025-06-25 18:31:03 +02:00