aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/CommonMark.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-06-10 18:26:44 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-10 18:26:44 +0200
commit94b3dacb4ea7e5e99ab62286b13877b92f9391b3 (patch)
tree4e1d9b98ebb2246c8a543163e980a927d25b0c34 /src/Text/Pandoc/Readers/CommonMark.hs
parentd6822157e75432e09210350e3b58eec3998dca76 (diff)
downloadpandoc-94b3dacb4ea7e5e99ab62286b13877b92f9391b3.tar.gz
Changed all readers to take Text instead of String.
Readers: Renamed StringReader -> TextReader. Updated tests. API change.
Diffstat (limited to 'src/Text/Pandoc/Readers/CommonMark.hs')
-rw-r--r--src/Text/Pandoc/Readers/CommonMark.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/CommonMark.hs b/src/Text/Pandoc/Readers/CommonMark.hs
index e98ee066e..3c62f8db5 100644
--- a/src/Text/Pandoc/Readers/CommonMark.hs
+++ b/src/Text/Pandoc/Readers/CommonMark.hs
@@ -34,15 +34,15 @@ where
import CMark
import Data.List (groupBy)
-import Data.Text (pack, unpack)
+import Data.Text (Text, unpack)
import Text.Pandoc.Class (PandocMonad)
import Text.Pandoc.Definition
import Text.Pandoc.Options
-- | Parse a CommonMark formatted string into a 'Pandoc' structure.
-readCommonMark :: PandocMonad m => ReaderOptions -> String -> m Pandoc
+readCommonMark :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
readCommonMark opts s = return $
- nodeToPandoc $ commonmarkToNode opts' $ pack s
+ nodeToPandoc $ commonmarkToNode opts' s
where opts' = if extensionEnabled Ext_smart (readerExtensions opts)
then [optNormalize, optSmart]
else [optNormalize]