0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-28 08:28:40 +01:00
gitea/modules/markup
Giteabot 3fe1f73268
Fix raw wiki links (#31825) (#31845)
Backport #31825 by @Zettat123

Fix #31395

This regression is introduced by #30273. To find out how GitHub handles
this case, I did [some
tests](https://github.com/go-gitea/gitea/issues/31395#issuecomment-2278929115).

I use redirect in this PR instead of checking if the corresponding `.md`
file exists when rendering the link because GitHub also uses redirect.
With this PR, there is no need to resolve the raw wiki link when
rendering a wiki page. If a wiki link points to a raw file, access will
be redirected to the raw link.

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-08-17 03:19:26 +00:00
..
asciicast Support asciicast files as new markup (#22448) 2023-01-18 08:46:58 +08:00
common Make user-content-* consistent with github (#26388) 2023-08-09 09:30:31 +00:00
console Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
csv Fix some pending problems (#29985) 2024-03-22 19:17:30 +08:00
external Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
markdown Fix raw wiki links (#31825) (#31845) 2024-08-17 03:19:26 +00:00
mdstripper
orgmode fix: rendering internal file links in org (#29669) 2024-03-10 18:30:14 +02:00
camo_test.go
camo.go
html_codepreview_test.go Render embedded code preview by permlink in markdown (#30234) 2024-04-02 17:48:27 +00:00
html_codepreview.go Refactor AppURL usage (#30885) (#30891) 2024-05-08 13:34:43 +00:00
html_internal_test.go Fix hash render end with colon (#31319) (#31346) 2024-06-13 01:14:49 +00:00
html_link.go Fix raw wiki links (#31825) (#31845) 2024-08-17 03:19:26 +00:00
html_node.go Support relative paths to videos from Wiki pages (#31061) (#31453) 2024-06-22 00:03:31 +03:00
html_test.go Fix raw wiki links (#31825) (#31845) 2024-08-17 03:19:26 +00:00
html.go Fix IsObjectExist with gogit (#31790) (#31806) 2024-08-09 15:43:23 +08:00
renderer_test.go Move IsReadmeFile* from modules/markup/ to modules/util (#22877) 2023-02-13 15:01:09 -05:00
renderer.go Fix rendered wiki page link (#31398) (#31407) 2024-06-19 11:23:24 +08:00
sanitizer_custom.go Split sanitizer functions and fine-tune some tests (#31192) (#31200) 2024-05-31 13:54:14 +00:00
sanitizer_default_test.go Split sanitizer functions and fine-tune some tests (#31192) (#31200) 2024-05-31 13:54:14 +00:00
sanitizer_default.go Split sanitizer functions and fine-tune some tests (#31192) (#31200) 2024-05-31 13:54:14 +00:00
sanitizer_description_test.go Split sanitizer functions and fine-tune some tests (#31192) (#31200) 2024-05-31 13:54:14 +00:00
sanitizer_description.go Split sanitizer functions and fine-tune some tests (#31192) (#31200) 2024-05-31 13:54:14 +00:00
sanitizer.go Split sanitizer functions and fine-tune some tests (#31192) (#31200) 2024-05-31 13:54:14 +00:00