diff options
-rw-r--r-- | pandoc.cabal | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/CommonMark.hs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pandoc.cabal b/pandoc.cabal index 9a5b92e6f..0a04be20d 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -275,7 +275,7 @@ Library deepseq-generics >= 0.1 && < 0.2, JuicyPixels >= 3.1.6.1 && < 3.3, filemanip >= 0.3 && < 0.4, - cmark >= 0.3.4 && < 0.4 + cmark >= 0.4.0.1 && < 0.5 if flag(old-locale) Build-Depends: old-locale >= 1 && < 1.1, time >= 1.2 && < 1.5 diff --git a/src/Text/Pandoc/Writers/CommonMark.hs b/src/Text/Pandoc/Writers/CommonMark.hs index 61ac0fdba..fee36d454 100644 --- a/src/Text/Pandoc/Writers/CommonMark.hs +++ b/src/Text/Pandoc/Writers/CommonMark.hs @@ -76,8 +76,8 @@ blocksToCommonMark opts bs = return $ $ node DOCUMENT (blocksToNodes bs) where cmarkOpts = [optHardBreaks | isEnabled Ext_hard_line_breaks opts] colwidth = if writerWrapText opts - then writerColumns opts - else 0 + then Just $ writerColumns opts + else Nothing inlinesToCommonMark :: WriterOptions -> [Inline] -> Identity String inlinesToCommonMark opts ils = return $ @@ -85,8 +85,8 @@ inlinesToCommonMark opts ils = return $ $ node PARAGRAPH (inlinesToNodes ils) where cmarkOpts = [optHardBreaks | isEnabled Ext_hard_line_breaks opts] colwidth = if writerWrapText opts - then writerColumns opts - else 0 + then Just $ writerColumns opts + else Nothing blocksToNodes :: [Block] -> [Node] blocksToNodes = foldr blockToNodes [] |