forgejo/modules/markup
Beowulf 85dacd8e50 fix(ui): improve rendering of commit links (#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

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10530
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-12-28 17:18:51 +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 Add to html button in markdown type="button" (#10520) 2025-12-21 05:21:27 +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.21.1 (forgejo) (#10479) 2025-12-20 17:13:12 +01: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 fix(ui): improve rendering of commit links (#10530) 2025-12-28 17:18:51 +01:00
html_internal_test.go fix(ui): improve rendering of commit links (#10530) 2025-12-28 17:18:51 +01:00
html_test.go fix(ui): improve rendering of commit links (#10530) 2025-12-28 17:18:51 +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 Add to html button in markdown type="button" (#10520) 2025-12-21 05:21:27 +01:00
sanitizer_test.go fix(ui): add missing lazy load attribute to images (#8246) 2025-06-25 18:31:03 +02:00