summaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-06-26 09:41:17 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-26 08:41:17 +0200
commit492b3b129190be9742981493812894f888bb5f2d (patch)
tree73280d0d9e36d611ffad6f8910a2d821d7db4b3b /test/Tests/Readers
parentb95f391bebdd6d79b11db4469d97640e80285ccc (diff)
Muse reader: fix horizontal rule parsing (#3762)
Do not parse 3 dashes as horizontal rule and allow whitespace after rule
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Muse.hs13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index bae389584..3d7baf8f0 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -91,7 +91,18 @@ tests =
]
, testGroup "Blocks"
- [ "Quote" =: "<quote>Hello, world</quote>" =?> blockQuote (para $ text "Hello, world")
+ [ "Block elements end paragraphs" =:
+ T.unlines [ "First paragraph"
+ , "----"
+ , "Second paragraph"
+ ] =?> para (text "First paragraph") <> horizontalRule <> para (text "Second paragraph")
+ , testGroup "Horizontal rule"
+ [ "Less than 4 dashes is not a horizontal rule" =: "---" =?> para (text "---")
+ , "4 dashes is a horizontal rule" =: "----" =?> horizontalRule
+ , "5 dashes is a horizontal rule" =: "-----" =?> horizontalRule
+ , "4 dashes with spaces is a horizontal rule" =: "---- " =?> horizontalRule
+ ]
+ , "Quote" =: "<quote>Hello, world</quote>" =?> blockQuote (para $ text "Hello, world")
, "Center" =: "<center>Hello, world</center>" =?> para (text "Hello, world")
, "Right" =: "<right>Hello, world</right>" =?> para (text "Hello, world")
, testGroup "Comments"