@@ -34,12 +34,12 @@ func TestRender_StandardLinks(t *testing.T) {
34
34
assert .Equal (t , strings .TrimSpace (expected ), strings .TrimSpace (buffer ))
35
35
}
36
36
37
- googleRendered := "<p><a href= \" https://google.com/\" title= \" https://google.com/ \" >https://google.com/</a></p>"
38
- test ( "[[ https://google.com/]]" , googleRendered )
37
+ test ( "[[ https://google.com/]]" ,
38
+ `<p><a href=" https://google.com/">https://google.com/</a></p>` )
39
39
40
40
lnk := util .URLJoin (AppSubURL , "WikiPage" )
41
41
test ("[[WikiPage][WikiPage]]" ,
42
- " <p><a href=\" " + lnk + " \" title= \" WikiPage \" >WikiPage</a></p>" )
42
+ ` <p><a href="` + lnk + `" >WikiPage</a></p>` )
43
43
}
44
44
45
45
func TestRender_Media (t * testing.T ) {
@@ -59,19 +59,23 @@ func TestRender_Media(t *testing.T) {
59
59
result := util .URLJoin (AppSubURL , url )
60
60
61
61
test ("[[file:" + url + "]]" ,
62
- " <p><img src=\" " + result + " \" alt=\" " + result + " \" title= \" " + result + " \" /></p>" )
62
+ ` <p><img src="` + result + `" alt="` + result + `" /></p>` )
63
63
64
64
// With description.
65
65
test ("[[https://example.com][https://example.com/example.svg]]" ,
66
66
`<p><a href="https://example.com"><img src="https://example.com/example.svg" alt="https://example.com/example.svg" /></a></p>` )
67
+ test ("[[https://example.com][pre https://example.com/example.svg post]]" ,
68
+ `<p><a href="https://example.com">pre <img src="https://example.com/example.svg" alt="https://example.com/example.svg" /> post</a></p>` )
67
69
test ("[[https://example.com][https://example.com/example.mp4]]" ,
68
- `<p><a href="https://example.com"><video src="https://example.com/example.mp4" title="https://example.com/example.mp4"></video></a></p>` )
70
+ `<p><a href="https://example.com"><video src="https://example.com/example.mp4">https://example.com/example.mp4</video></a></p>` )
71
+ test ("[[https://example.com][pre https://example.com/example.mp4 post]]" ,
72
+ `<p><a href="https://example.com">pre <video src="https://example.com/example.mp4">https://example.com/example.mp4</video> post</a></p>` )
69
73
70
74
// Without description.
71
75
test ("[[https://example.com/example.svg]]" ,
72
- `<p><img src="https://example.com/example.svg" alt="https://example.com/example.svg" title="https://example.com/example.svg" /></p>` )
76
+ `<p><img src="https://example.com/example.svg" alt="https://example.com/example.svg" /></p>` )
73
77
test ("[[https://example.com/example.mp4]]" ,
74
- `<p><video src="https://example.com/example.mp4" title="https://example.com/example.mp4" >https://example.com/example.mp4</video></p>` )
78
+ `<p><video src="https://example.com/example.mp4">https://example.com/example.mp4</video></p>` )
75
79
}
76
80
77
81
func TestRender_Source (t * testing.T ) {
0 commit comments