summaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-01-14 13:06:27 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:42 +0100
commit3876b91448ad8d279f5d5a9d217e00cf4583e14b (patch)
treeab1050da4d77dd666f9698d4517a0e0b786ba227 /tests/Tests/Readers
parent14272521600f9a616c07333261fa258b3dc5c487 (diff)
Make Extensions a custom type instead of a Set Extension.
The type is implemented in terms of an underlying bitset which should be more efficient. API change: from Text.Pandoc.Extensions export Extensions, emptyExtensions, extensionsFromList, enableExtension, disableExtension, extensionEnabled.
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r--tests/Tests/Readers/Markdown.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs
index b43a0ec49..3bc8f34ae 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -6,7 +6,6 @@ import Test.Framework
import Tests.Helpers
import Text.Pandoc.Arbitrary()
import Text.Pandoc.Builder
-import qualified Data.Set as Set
import Text.Pandoc
markdown :: String -> Pandoc
@@ -16,7 +15,7 @@ markdownSmart :: String -> Pandoc
markdownSmart = purely $ readMarkdown def { readerSmart = True }
markdownCDL :: String -> Pandoc
-markdownCDL = purely $ readMarkdown def { readerExtensions = Set.insert
+markdownCDL = purely $ readMarkdown def { readerExtensions = enableExtension
Ext_compact_definition_lists $ readerExtensions def }
markdownGH :: String -> Pandoc
@@ -30,7 +29,7 @@ infix 4 =:
testBareLink :: (String, Inlines) -> Test
testBareLink (inp, ils) =
test (purely $ readMarkdown def{ readerExtensions =
- Set.fromList [Ext_autolink_bare_uris, Ext_raw_html] })
+ extensionsFromList [Ext_autolink_bare_uris, Ext_raw_html] })
inp (inp, doc $ para ils)
autolink :: String -> Inlines
@@ -303,7 +302,7 @@ tests = [ testGroup "inline code"
=?> para (note (para "See [^1]"))
]
, testGroup "lhs"
- [ test (purely $ readMarkdown def{ readerExtensions = Set.insert
+ [ test (purely $ readMarkdown def{ readerExtensions = enableExtension
Ext_literate_haskell $ readerExtensions def })
"inverse bird tracks and html" $
"> a\n\n< b\n\n<div>\n"