|
635 | 635 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
636 | 636 | <a href="/file.bin" rel="nofollow">local link</a><br/> |
637 | 637 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
638 | | -<a href="/src/file.bin" rel="nofollow">local link</a><br/> |
| 638 | +<a href="/file.bin" rel="nofollow">local link</a><br/> |
639 | 639 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
640 | 640 | <a href="/image.jpg" target="_blank" rel="nofollow noopener"><img src="/image.jpg" alt="local image"/></a><br/> |
641 | 641 | <a href="/path/file" target="_blank" rel="nofollow noopener"><img src="/path/file" alt="local image"/></a><br/> |
@@ -691,7 +691,7 @@ space</p> |
691 | 691 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
692 | 692 | <a href="https://gitea.io/file.bin" rel="nofollow">local link</a><br/> |
693 | 693 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
694 | | -<a href="https://gitea.io/src/file.bin" rel="nofollow">local link</a><br/> |
| 694 | +<a href="https://gitea.io/file.bin" rel="nofollow">local link</a><br/> |
695 | 695 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
696 | 696 | <a href="https://gitea.io/image.jpg" target="_blank" rel="nofollow noopener"><img src="https://gitea.io/image.jpg" alt="local image"/></a><br/> |
697 | 697 | <a href="https://gitea.io/path/file" target="_blank" rel="nofollow noopener"><img src="https://gitea.io/path/file" alt="local image"/></a><br/> |
@@ -749,7 +749,7 @@ space</p> |
749 | 749 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
750 | 750 | <a href="/relative/path/file.bin" rel="nofollow">local link</a><br/> |
751 | 751 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
752 | | -<a href="/relative/path/src/file.bin" rel="nofollow">local link</a><br/> |
| 752 | +<a href="/relative/path/file.bin" rel="nofollow">local link</a><br/> |
753 | 753 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
754 | 754 | <a href="/relative/path/image.jpg" target="_blank" rel="nofollow noopener"><img src="/relative/path/image.jpg" alt="local image"/></a><br/> |
755 | 755 | <a href="/relative/path/path/file" target="_blank" rel="nofollow noopener"><img src="/relative/path/path/file" alt="local image"/></a><br/> |
@@ -866,7 +866,7 @@ space</p> |
866 | 866 | Expected: `<p>space @mention-user<br/> |
867 | 867 | /just/a/path.bin<br/> |
868 | 868 | <a href="https://example.com/file.bin" rel="nofollow">https://example.com/file.bin</a><br/> |
869 | | -<a href="/user/repo/file.bin" rel="nofollow">local link</a><br/> |
| 869 | +<a href="/user/repo/src/sub/folder/file.bin" rel="nofollow">local link</a><br/> |
870 | 870 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
871 | 871 | <a href="/user/repo/src/sub/folder/file.bin" rel="nofollow">local link</a><br/> |
872 | 872 | <a href="https://example.com" rel="nofollow">remote link</a><br/> |
@@ -984,7 +984,7 @@ space</p> |
984 | 984 | for i, c := range cases { |
985 | 985 | result, err := markdown.RenderString(&markup.RenderContext{Ctx: context.Background(), Links: c.Links, IsWiki: c.IsWiki}, input) |
986 | 986 | assert.NoError(t, err, "Unexpected error in testcase: %v", i) |
987 | | - assert.Equal(t, template.HTML(c.Expected), result, "Unexpected result in testcase %v", i) |
| 987 | + assert.Equal(t, c.Expected, string(result), "Unexpected result in testcase %v", i) |
988 | 988 | } |
989 | 989 | } |
990 | 990 |
|
|
0 commit comments