aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/CommonMark.hs8
1 files changed, 4 insertions, 4 deletions
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 []