|
626 | 626 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
627 | 627 | <a href="/file.bin" rel="nofollow">local link</a><br/> |
628 | 628 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
629 | | -<a href="/src/file.bin" rel="nofollow">local link</a><br/> |
| 629 | +<a href="/file.bin" rel="nofollow">local link</a><br/> |
630 | 630 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
631 | 631 | <a href="/image.jpg" target="_blank" rel="nofollow noopener"><img src="/image.jpg" alt="local image"/></a><br/> |
632 | 632 | <a href="/path/file" target="_blank" rel="nofollow noopener"><img src="/path/file" alt="local image"/></a><br/> |
@@ -682,7 +682,7 @@ space</p> |
682 | 682 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
683 | 683 | <a href="https://gitea.io/file.bin" rel="nofollow">local link</a><br/> |
684 | 684 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
685 | | -<a href="https://gitea.io/src/file.bin" rel="nofollow">local link</a><br/> |
| 685 | +<a href="https://gitea.io/file.bin" rel="nofollow">local link</a><br/> |
686 | 686 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
687 | 687 | <a href="https://gitea.io/image.jpg" target="_blank" rel="nofollow noopener"><img src="https://gitea.io/image.jpg" alt="local image"/></a><br/> |
688 | 688 | <a href="https://gitea.io/path/file" target="_blank" rel="nofollow noopener"><img src="https://gitea.io/path/file" alt="local image"/></a><br/> |
@@ -740,7 +740,7 @@ space</p> |
740 | 740 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
741 | 741 | <a href="/relative/path/file.bin" rel="nofollow">local link</a><br/> |
742 | 742 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
743 | | -<a href="/relative/path/src/file.bin" rel="nofollow">local link</a><br/> |
| 743 | +<a href="/relative/path/file.bin" rel="nofollow">local link</a><br/> |
744 | 744 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
745 | 745 | <a href="/relative/path/image.jpg" target="_blank" rel="nofollow noopener"><img src="/relative/path/image.jpg" alt="local image"/></a><br/> |
746 | 746 | <a href="/relative/path/path/file" target="_blank" rel="nofollow noopener"><img src="/relative/path/path/file" alt="local image"/></a><br/> |
@@ -857,7 +857,7 @@ space</p> |
857 | 857 | Expected: `<p>space @mention-user<br/> |
858 | 858 | /just/a/path.bin<br/> |
859 | 859 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
860 | | -<a href="/user/repo/file.bin" rel="nofollow">local link</a><br/> |
| 860 | +<a href="/user/repo/src/sub/folder/file.bin" rel="nofollow">local link</a><br/> |
861 | 861 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
862 | 862 | <a href="/user/repo/src/sub/folder/file.bin" rel="nofollow">local link</a><br/> |
863 | 863 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
@@ -975,7 +975,7 @@ space</p> |
975 | 975 | for i, c := range cases { |
976 | 976 | result, err := markdown.RenderString(&markup.RenderContext{Ctx: context.Background(), Links: c.Links, IsWiki: c.IsWiki}, input) |
977 | 977 | assert.NoError(t, err, "Unexpected error in testcase: %v", i) |
978 | | - assert.Equal(t, template.HTML(c.Expected), result, "Unexpected result in testcase %v", i) |
| 978 | + assert.Equal(t, c.Expected, string(result), "Unexpected result in testcase %v", i) |
979 | 979 | } |
980 | 980 | } |
981 | 981 |
|
|
0 commit comments