From aca4137c4094ec921276bf50278dfc58db5634a3 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 14 Mar 2018 12:23:51 +0300 Subject: Muse writer: only escape brackets when necessary It includes cases when they can be mistaken for footnotes and links, as well as inside link description. --- test/Tests/Writers/Muse.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/Tests/Writers') diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index 88d2db8cf..eca7ed736 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -301,8 +301,11 @@ tests = [ testGroup "block elements" [ testGroup "string" [ "string" =: str "foo" =?> "foo" , "escape footnote" =: str "[1]" =?> "[1]" + , "do not escape brackets" =: str "[12ab]" =?> "[12ab]" , "escape verbatim close tag" =: str "foobar" =?> "foo</verbatim>bar" + , "escape link-like text" =: str "[[https://www.example.org]]" + =?> "[[https://www.example.org]]" , "escape pipe to avoid accidental tables" =: str "foo | bar" =?> "foo | bar" , "escape hash to avoid accidental anchors" =: text "#foo bar" -- cgit v1.2.3