aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers/Markdown.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-02-07 08:32:47 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2020-02-07 09:08:22 -0800
commit4c3db9273fc8e92c2c23d4455a6ab178472be06d (patch)
treecdfc8d65ebd56c0a571f8b46854465dd434489de /test/Tests/Writers/Markdown.hs
parent6cd77d4c638012be63d66882403804aa28feb6ed (diff)
downloadpandoc-4c3db9273fc8e92c2c23d4455a6ab178472be06d.tar.gz
Apply linter suggestions. Add fix_spacing to lint target in Makefile.
Diffstat (limited to 'test/Tests/Writers/Markdown.hs')
-rw-r--r--test/Tests/Writers/Markdown.hs46
1 files changed, 23 insertions, 23 deletions
diff --git a/test/Tests/Writers/Markdown.hs b/test/Tests/Writers/Markdown.hs
index aae4d082c..00f883ecb 100644
--- a/test/Tests/Writers/Markdown.hs
+++ b/test/Tests/Writers/Markdown.hs
@@ -93,7 +93,7 @@ noteTests = testGroup "note and reference location"
[ test (markdownWithOpts defopts)
"footnotes at the end of a document" $
noteTestDoc =?>
- (unlines [ "First Header"
+ unlines [ "First Header"
, "============"
, ""
, "This is a footnote.[^1] And this is a [link](https://www.google.com)."
@@ -110,11 +110,11 @@ noteTests = testGroup "note and reference location"
, "[^1]: Down here."
, ""
, "[^2]: The second note."
- ])
+ ]
, test (markdownWithOpts defopts{writerReferenceLocation=EndOfBlock})
"footnotes at the end of blocks" $
noteTestDoc =?>
- (unlines [ "First Header"
+ unlines [ "First Header"
, "============"
, ""
, "This is a footnote.[^1] And this is a [link](https://www.google.com)."
@@ -131,11 +131,11 @@ noteTests = testGroup "note and reference location"
, "============="
, ""
, "Some more text."
- ])
+ ]
, test (markdownWithOpts defopts{writerReferenceLocation=EndOfBlock, writerReferenceLinks=True})
"footnotes and reference links at the end of blocks" $
noteTestDoc =?>
- (unlines [ "First Header"
+ unlines [ "First Header"
, "============"
, ""
, "This is a footnote.[^1] And this is a [link]."
@@ -154,11 +154,11 @@ noteTests = testGroup "note and reference location"
, "============="
, ""
, "Some more text."
- ])
+ ]
, test (markdownWithOpts defopts{writerReferenceLocation=EndOfSection})
"footnotes at the end of section" $
noteTestDoc =?>
- (unlines [ "First Header"
+ unlines [ "First Header"
, "============"
, ""
, "This is a footnote.[^1] And this is a [link](https://www.google.com)."
@@ -175,7 +175,7 @@ noteTests = testGroup "note and reference location"
, "============="
, ""
, "Some more text."
- ])
+ ]
]
@@ -191,24 +191,24 @@ shortcutLinkRefsTests =
=: para (link "/url" "title" "foo")
=?> "[foo]\n\n [foo]: /url \"title\""
, "Followed by another link (unshortcutable)"
- =: para ((link "/url1" "title1" "first")
- <> (link "/url2" "title2" "second"))
+ =: para (link "/url1" "title1" "first"
+ <> link "/url2" "title2" "second")
=?> unlines [ "[first][][second]"
, ""
, " [first]: /url1 \"title1\""
, " [second]: /url2 \"title2\""
]
, "Followed by space and another link (unshortcutable)"
- =: para ((link "/url1" "title1" "first") <> " "
- <> (link "/url2" "title2" "second"))
+ =: para (link "/url1" "title1" "first" <> " "
+ <> link "/url2" "title2" "second")
=?> unlines [ "[first][] [second]"
, ""
, " [first]: /url1 \"title1\""
, " [second]: /url2 \"title2\""
]
, "Reference link is used multiple times (unshortcutable)"
- =: para ((link "/url1" "" "foo") <> (link "/url2" "" "foo")
- <> (link "/url3" "" "foo"))
+ =: para (link "/url1" "" "foo" <> link "/url2" "" "foo"
+ <> link "/url3" "" "foo")
=?> unlines [ "[foo][][foo][1][foo][2]"
, ""
, " [foo]: /url1"
@@ -216,8 +216,8 @@ shortcutLinkRefsTests =
, " [2]: /url3"
]
, "Reference link is used multiple times (unshortcutable)"
- =: para ((link "/url1" "" "foo") <> " " <> (link "/url2" "" "foo")
- <> " " <> (link "/url3" "" "foo"))
+ =: para (link "/url1" "" "foo" <> " " <> link "/url2" "" "foo"
+ <> " " <> link "/url3" "" "foo")
=?> unlines [ "[foo][] [foo][1] [foo][2]"
, ""
, " [foo]: /url1"
@@ -225,43 +225,43 @@ shortcutLinkRefsTests =
, " [2]: /url3"
]
, "Reference link is followed by text in brackets"
- =: para ((link "/url" "" "link") <> "[text in brackets]")
+ =: para (link "/url" "" "link" <> "[text in brackets]")
=?> unlines [ "[link][]\\[text in brackets\\]"
, ""
, " [link]: /url"
]
, "Reference link is followed by space and text in brackets"
- =: para ((link "/url" "" "link") <> " [text in brackets]")
+ =: para (link "/url" "" "link" <> " [text in brackets]")
=?> unlines [ "[link][] \\[text in brackets\\]"
, ""
, " [link]: /url"
]
, "Reference link is followed by RawInline"
- =: para ((link "/url" "" "link") <> rawInline "markdown" "[rawText]")
+ =: para (link "/url" "" "link" <> rawInline "markdown" "[rawText]")
=?> unlines [ "[link][][rawText]"
, ""
, " [link]: /url"
]
, "Reference link is followed by space and RawInline"
- =: para ((link "/url" "" "link") <> space <> rawInline "markdown" "[rawText]")
+ =: para (link "/url" "" "link" <> space <> rawInline "markdown" "[rawText]")
=?> unlines [ "[link][] [rawText]"
, ""
, " [link]: /url"
]
, "Reference link is followed by RawInline with space"
- =: para ((link "/url" "" "link") <> rawInline "markdown" " [rawText]")
+ =: para (link "/url" "" "link" <> rawInline "markdown" " [rawText]")
=?> unlines [ "[link][] [rawText]"
, ""
, " [link]: /url"
]
, "Reference link is followed by citation"
- =: para ((link "/url" "" "link") <> cite [Citation "author" [] [] NormalCitation 0 0] (str "[@author]"))
+ =: para (link "/url" "" "link" <> cite [Citation "author" [] [] NormalCitation 0 0] (str "[@author]"))
=?> unlines [ "[link][][@author]"
, ""
, " [link]: /url"
]
, "Reference link is followed by space and citation"
- =: para ((link "/url" "" "link") <> space <> cite [Citation "author" [] [] NormalCitation 0 0] (str "[@author]"))
+ =: para (link "/url" "" "link" <> space <> cite [Citation "author" [] [] NormalCitation 0 0] (str "[@author]"))
=?> unlines [ "[link][] [@author]"
, ""
, " [link]: /url"