Skip to content

Commit 8c31365

Browse files
committed
add testcase
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 2da4391 commit 8c31365

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

modules/markup/markdown/markdown_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ func TestRender_Images(t *testing.T) {
9393
test(
9494
"[!["+title+"]("+url+")]("+href+")",
9595
`<p><a href="`+href+`" rel="nofollow"><img src="`+result+`" alt="`+title+`"/></a></p>`)
96+
97+
url = "/../../.images/src/02/train.jpg"
98+
test(
99+
"!["+title+"]("+url+")",
100+
`<p><a href="`+result+`" rel="nofollow"><img src="`+result+`" alt="`+title+`"/></a></p>`)
101+
102+
test(
103+
"[["+title+"|"+url+"]]",
104+
`<p><a href="`+result+`" rel="nofollow"><img src="`+result+`" title="`+title+`" alt="`+title+`"/></a></p>`)
105+
test(
106+
"[!["+title+"]("+url+")]("+href+")",
107+
`<p><a href="`+href+`" rel="nofollow"><img src="`+result+`" alt="`+title+`"/></a></p>`)
108+
96109
}
97110

98111
func testAnswers(baseURLContent, baseURLImages string) []string {

0 commit comments

Comments
 (0)