diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2024-03-13 11:34:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 10:34:58 +0000 |
commit | 85c59d6c21e10ef9d3ccf11713548f50e47e920f (patch) | |
tree | 3d6208785763a7e5aa3b2f5ad47e9fc8032b7f0e /modules/markup/html_test.go | |
parent | 66edc888ee8b2f77a6f11139acd2d03c561ad5ef (diff) | |
download | gitea-85c59d6c21e10ef9d3ccf11713548f50e47e920f.tar.gz gitea-85c59d6c21e10ef9d3ccf11713548f50e47e920f.zip |
Use relative links for commits, mentions, and issues in markdown (#29427)
Fixes #29404
Use relative links for
- commits
- mentions
- issues
---------
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'modules/markup/html_test.go')
-rw-r--r-- | modules/markup/html_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index ccb63c6bab..55de65d196 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -43,7 +43,8 @@ func TestRender_Commits(t *testing.T) { Ctx: git.DefaultContext, RelativePath: ".md", Links: markup.Links{ - Base: markup.TestRepoURL, + AbsolutePrefix: true, + Base: markup.TestRepoURL, }, Metas: localMetas, }, input) @@ -96,7 +97,8 @@ func TestRender_CrossReferences(t *testing.T) { Ctx: git.DefaultContext, RelativePath: "a.md", Links: markup.Links{ - Base: setting.AppSubURL, + AbsolutePrefix: true, + Base: setting.AppSubURL, }, Metas: localMetas, }, input) @@ -588,7 +590,8 @@ func TestPostProcess_RenderDocument(t *testing.T) { err := markup.PostProcess(&markup.RenderContext{ Ctx: git.DefaultContext, Links: markup.Links{ - Base: "https://example.com", + AbsolutePrefix: true, + Base: "https://example.com", }, Metas: localMetas, }, strings.NewReader(input), &res) |