From 8df59952bf54321a0e24a1e9104324c7ae9c153f Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 21 Oct 2018 06:42:00 +0300 Subject: Muse reader: allow empty headers Previously empty headers caused parser to terminate without parsing the rest of the document. --- test/Tests/Readers/Muse.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/Tests/Readers') diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 75dd4e7da..ab0579519 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -650,6 +650,13 @@ tests = T.unlines [ "* Foo" , "bar" ] =?> header 1 "Foo\nbar" + , "Empty header" =: + T.unlines [ "Foo" + , "" + , "* " + , "" + , "bar" + ] =?> para (text "Foo") <> header 1 "" <> para (text "bar") , test (purely $ readMuse def { readerExtensions = extensionsFromList [Ext_amuse, Ext_auto_identifiers]}) "Auto identifiers" (T.unlines [ "* foo" -- cgit v1.2.3