@@ -34,12 +34,12 @@ func TestRender_StandardLinks(t *testing.T) {
3434 assert .Equal (t , strings .TrimSpace (expected ), strings .TrimSpace (buffer ))
3535 }
3636
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>` )
3939
4040 lnk := util .URLJoin (AppSubURL , "WikiPage" )
4141 test ("[[WikiPage][WikiPage]]" ,
42- " <p><a href=\" " + lnk + " \" title= \" WikiPage \" >WikiPage</a></p>" )
42+ ` <p><a href="` + lnk + `" >WikiPage</a></p>` )
4343}
4444
4545func TestRender_Media (t * testing.T ) {
@@ -59,19 +59,23 @@ func TestRender_Media(t *testing.T) {
5959 result := util .URLJoin (AppSubURL , url )
6060
6161 test ("[[file:" + url + "]]" ,
62- " <p><img src=\" " + result + " \" alt=\" " + result + " \" title= \" " + result + " \" /></p>" )
62+ ` <p><img src="` + result + `" alt="` + result + `" /></p>` )
6363
6464 // With description.
6565 test ("[[https://example.com][https://example.com/example.svg]]" ,
6666 `<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>` )
6769 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>` )
6973
7074 // Without description.
7175 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>` )
7377 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>` )
7579}
7680
7781func TestRender_Source (t * testing.T ) {
0 commit comments