From 05bb8ef4aa6faa6a4da3c54a0483d42b846733ca Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 28 Aug 2017 17:48:46 +0300 Subject: RST reader: handle blank lines correctly in line blocks (#3881) Previously pandoc would sometimes combine two line blocks separated by blanks, and ignore trailing blank lines within the line block. Test is checked to be consisted with http://rst.ninjs.org/ --- test/Tests/Readers/RST.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/Tests') diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs index 61a2673f5..928fc1a99 100644 --- a/test/Tests/Readers/RST.hs +++ b/test/Tests/Readers/RST.hs @@ -136,6 +136,19 @@ tests = [ "line block with blank line" =: para "but must stop here") , "line block with 3 lines" =: "| a\n| b\n| c" =?> lineBlock ["a", "b", "c"] + , "line blocks with blank lines" =: T.unlines + [ "|" + , "" + , "|" + , "| a" + , "| b" + , "|" + , "" + , "|" + ] =?> + lineBlock [""] <> + lineBlock ["", "a", "b", ""] <> + lineBlock [""] , "quoted literal block using >" =: "::\n\n> quoted\n> block\n\nOrdinary paragraph" =?> codeBlock "> quoted\n> block" <> para "Ordinary paragraph" , "quoted literal block using | (not a line block)" =: "::\n\n| quoted\n| block\n\nOrdinary paragraph" -- cgit v1.2.3 From 14f813c3f294739f3965058e27eb228ab3ed90d5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 29 Aug 2017 22:40:34 +0300 Subject: Muse reader: parse verse markup (#3882) --- test/Tests/Readers/Muse.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/Tests') diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 1f3218daf..4e5e5b606 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -145,6 +145,30 @@ tests = , " with a continuation" ] =?> blockQuote (para "This is a quotation with a continuation") + , "Verse" =: + T.unlines [ "> This is" + , "> First stanza" + , ">" -- Emacs produces verbatim ">" here, we follow Amusewiki + , "> And this is" + , "> Second stanza" + , ">" + , "" + , ">" + , "" + , "> Another verse" + , "> is here" + ] =?> + lineBlock [ "This is" + , "First stanza" + , "" + , "And this is" + , "\160\160Second stanza" + , "" + ] <> + lineBlock [ "" ] <> + lineBlock [ "Another verse" + , "\160\160\160is here" + ] ] , "Quote tag" =: "Hello, world" =?> blockQuote (para $ text "Hello, world") , "Verse tag" =: -- cgit v1.2.3 From c09b586147d607f645a639a47c7781e8d8655e20 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 5 Sep 2017 07:22:40 +0300 Subject: Muse reader: parse
tag (#3888) --- test/Tests/Readers/Muse.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/Tests') diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 4e5e5b606..714736c7f 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -145,6 +145,14 @@ tests = , " with a continuation" ] =?> blockQuote (para "This is a quotation with a continuation") + , testGroup "Div" + [ "Div without id" =: + "
Foo bar
" =?> + divWith nullAttr (para "Foo bar") + , "Div with id" =: + "
Foo bar
" =?> + divWith ("foo", [], []) (para "Foo bar") + ] , "Verse" =: T.unlines [ "> This is" , "> First stanza" -- cgit v1.2.3 From 350c282f205f48c6d0f7a96bf349b585a16fbcf4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 5 Sep 2017 19:41:27 +0300 Subject: Muse reader: require at least one space char after * in header (#3895) --- test/Tests/Readers/Muse.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'test/Tests') diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 714736c7f..d9222b1dc 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -224,6 +224,7 @@ tests = , "Subsubsection" =: "***** Fifth level\n" =?> header 5 "Fifth level" + , "Whitespace is required after *" =: "**Not a header\n" =?> para "**Not a header" , "No headers in footnotes" =: T.unlines [ "Foo[1]" , "[1] * Bar" -- cgit v1.2.3 From 743413a5b506351499fa2fb66d4184d74e125c54 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 6 Sep 2017 18:48:06 +0300 Subject: Muse reader: Allow finishing header with EOF (#3897) --- test/Tests/Readers/Muse.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/Tests') diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index d9222b1dc..dac167a92 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -210,21 +210,21 @@ tests = ] , testGroup "Headers" [ "Part" =: - "* First level\n" =?> + "* First level" =?> header 1 "First level" , "Chapter" =: - "** Second level\n" =?> + "** Second level" =?> header 2 "Second level" , "Section" =: - "*** Third level\n" =?> + "*** Third level" =?> header 3 "Third level" , "Subsection" =: - "**** Fourth level\n" =?> + "**** Fourth level" =?> header 4 "Fourth level" , "Subsubsection" =: - "***** Fifth level\n" =?> + "***** Fifth level" =?> header 5 "Fifth level" - , "Whitespace is required after *" =: "**Not a header\n" =?> para "**Not a header" + , "Whitespace is required after *" =: "**Not a header" =?> para "**Not a header" , "No headers in footnotes" =: T.unlines [ "Foo[1]" , "[1] * Bar" -- cgit v1.2.3