diff options
author | Alexander <ilabdsf@gmail.com> | 2017-08-06 23:19:59 +0300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-06 13:19:59 -0700 |
commit | 8164a005c0ac9e36d9d1485fcf38e9073a1bcd68 (patch) | |
tree | 27c0e48d96e5f501ebd714752904f23520289594 /test/Tests | |
parent | 685788cd4b13d2162dc011e8f3826da37522e59b (diff) | |
download | pandoc-8164a005c0ac9e36d9d1485fcf38e9073a1bcd68.tar.gz |
Muse reader: debug list and list item separation rules (#3837)
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Readers/Muse.hs | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 6e04fd943..33fe2aeb3 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -309,6 +309,95 @@ tests = , para "c" ] ] + -- Emacs Muse allows to separate lists with two or more blank lines. + -- Text::Amuse (Amusewiki engine) always creates a single list as of version 0.82. + -- pandoc follows Emacs Muse behavior + , testGroup "Blank lines" + [ "Blank lines between list items are not required" =: + T.unlines + [ " - Foo" + , " - Bar" + ] =?> + bulletList [ para "Foo" + , para "Bar" + ] + , "One blank line between list items is allowed" =: + T.unlines + [ " - Foo" + , "" + , " - Bar" + ] =?> + bulletList [ para "Foo" + , para "Bar" + ] + , "Two blank lines separate lists" =: + T.unlines + [ " - Foo" + , "" + , "" + , " - Bar" + ] =?> + bulletList [ para "Foo" ] <> bulletList [ para "Bar" ] + , "No blank line after multiline first item" =: + T.unlines + [ " - Foo" + , " bar" + , " - Baz" + ] =?> + bulletList [ para "Foo bar" + , para "Baz" + ] + , "One blank line after multiline first item" =: + T.unlines + [ " - Foo" + , " bar" + , "" + , " - Baz" + ] =?> + bulletList [ para "Foo bar" + , para "Baz" + ] + , "Two blank lines after multiline first item" =: + T.unlines + [ " - Foo" + , " bar" + , "" + , "" + , " - Baz" + ] =?> + bulletList [ para "Foo bar" ] <> bulletList [ para "Baz" ] + , "No blank line after list continuation" =: + T.unlines + [ " - Foo" + , "" + , " bar" + , " - Baz" + ] =?> + bulletList [ para "Foo" <> para "bar" + , para "Baz" + ] + , "One blank line after list continuation" =: + T.unlines + [ " - Foo" + , "" + , " bar" + , "" + , " - Baz" + ] =?> + bulletList [ para "Foo" <> para "bar" + , para "Baz" + ] + , "Two blank lines after list continuation" =: + T.unlines + [ " - Foo" + , "" + , " bar" + , "" + , "" + , " - Baz" + ] =?> + bulletList [ para "Foo" <> para "bar" ] <> bulletList [ para "Baz" ] + ] -- Headers in first column of list continuation are not allowed , "No headers in list continuation" =: T.unlines |