diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-20 11:15:43 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-20 12:16:34 +0300 |
commit | d63bba30661182f15e56d07997ee0f7b539eb2ce (patch) | |
tree | 008e5a36fbfda98eb8b7097eaff4895833e465bc /test/Tests | |
parent | 43677682d87824cf21b55dbc867a9e866b8296b4 (diff) | |
download | pandoc-d63bba30661182f15e56d07997ee0f7b539eb2ce.tar.gz |
Muse writer: escape "]" brackets in URLs as "%5D"
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Writers/Muse.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index acd834173..2728fd9f9 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -372,6 +372,21 @@ tests = [ testGroup "block elements" =?> "[[URL:1.png][Link to image]]" , "link to image without description" =: link "1.png" "" (str "1.png") =?> "[[URL:1.png]]" + + , testGroup "escape brackets in links" + [ "link with description" + =: link "https://example.com/foo].txt" "" (str "Description") + =?> "[[https://example.com/foo%5D.txt][Description]]" + , "link without description" + =: link "https://example.com/foo].txt" "" (str "https://example.com/foo].txt") + =?> "[[https://example.com/foo%5D.txt][<verbatim>https://example.com/foo].txt</verbatim>]]" + , "image link with description" + =: link "foo]bar.png" "" (str "Image link") + =?> "[[URL:foo%5Dbar.png][Image link]]" + , "image link without description" + =: link "foo]bar.png" "" (str "foo]bar.png") + =?> "[[URL:foo%5Dbar.png][<verbatim>foo]bar.png</verbatim>]]" + ] ] , "image" =: image "image.png" "Image 1" (str "") =?> "[[image.png][Image 1]]" , "image with width" =: |