Fix rendered wiki page link (#31398)

Fix #31395
This commit is contained in:
wxiaoguang 2024-06-18 11:09:20 +08:00 committed by GitHub
parent 37a4b233a0
commit 21783a5752
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 58 additions and 73 deletions

View file

@ -174,7 +174,7 @@ func TestRenderMarkdownToHtml(t *testing.T) {
<a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a>
<a href="/file.bin" rel="nofollow">local link</a>
<a href="https://example.com" rel="nofollow">remote link</a>
<a href="/src/file.bin" rel="nofollow">local link</a>
<a href="/file.bin" rel="nofollow">local link</a>
<a href="https://example.com" rel="nofollow">remote link</a>
<a href="/image.jpg" target="_blank" rel="nofollow noopener"><img src="/image.jpg" alt="local image"/></a>
<a href="https://example.com/image.jpg" target="_blank" rel="nofollow noopener"><img src="https://example.com/image.jpg" alt="remote image"/></a>
@ -190,7 +190,7 @@ com 88fc37a3c0a4dda553bdcfc80c178a58247f42fb mit
#123
space</p>
`
assert.EqualValues(t, expected, RenderMarkdownToHtml(context.Background(), testInput()))
assert.Equal(t, expected, string(RenderMarkdownToHtml(context.Background(), testInput())))
}
func TestRenderLabels(t *testing.T) {