Updated to use cmark >= 0.4.

This commit is contained in:
John MacFarlane 2015-07-14 22:51:23 -07:00
parent 9e0fb844a9
commit 6c32afc3c4
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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 []