Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-29 05:06:11 +01:00

[GITEA] Fix generated source URL on rendered files

- The permalink and 'Reference in New issue' URL of an renderable
file (those where you can see the source and a rendered version of it,
such as markdown) doesn't contain `?display=source`. This leads the
issue that the URL doesn't have any effect, as by default the rendered
version is shown and thus not the source.
- Add `?display=source` to the permalink URL and to 'Reference in New Issue' if it's renderable file.
- Add integration testing.

(cherry picked from commit 458f20f862)
(cherry picked from commit 5e630d7b10)

Conflicts:
	models/fixtures/repo_unit.yml
	https://codeberg.org/forgejo/forgejo/pulls/1178
(cherry picked from commit a10c6eb9c9)
(cherry picked from commit 0fcfb355af)
This commit is contained in:
Gusted 2023-07-21 21:04:05 +02:00 committed by Earl Warren
parent b891bb176d
commit eb20d7110c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -608,6 +608,20 @@
type: 1
created_unix: 946684810
# BEGIN Forgejo [GITEA] Fix generated source URL on rendered files
-
id: 1091
repo_id: 49
type: 1
created_unix: 946684810
-
id: 1092
repo_id: 49
type: 2
created_unix: 946684810
# END Forgejo [GITEA] Fix generated source URL on rendered files
-
id: 91
repo_id: 58