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

Use relative links for commits, mentions, and issues in markdown (#29427) (followup)

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2024-03-17 18:15:10 +01:00 committed by Earl Warren
parent 024bfb7f34
commit 3bd42e5879
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -61,7 +61,7 @@ func TestMain(m *testing.M) {
func TestApostrophesInMentions(t *testing.T) { func TestApostrophesInMentions(t *testing.T) {
rendered := RenderMarkdownToHtml(context.Background(), "@mention-user's comment") rendered := RenderMarkdownToHtml(context.Background(), "@mention-user's comment")
assert.EqualValues(t, "<p><a href=\"http://localhost:3000/mention-user\" rel=\"nofollow\">@mention-user</a>&#39;s comment</p>\n", rendered) assert.EqualValues(t, template.HTML("<p><a href=\"/mention-user\" rel=\"nofollow\">@mention-user</a>&#39;s comment</p>\n"), rendered)
} }
func TestRenderCommitBody(t *testing.T) { func TestRenderCommitBody(t *testing.T) {