CommonMark reader: make exts depend on extensions.
This commit is contained in:
parent
91c989d622
commit
d752f85582
1 changed files with 4 additions and 2 deletions
|
@ -43,8 +43,10 @@ import Text.Pandoc.Options
|
|||
readCommonMark :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
|
||||
readCommonMark opts s = return $
|
||||
nodeToPandoc $ commonmarkToNode opts' exts s
|
||||
where opts' = [optSmart | enabled Ext_smart]
|
||||
exts = [extStrikethrough, extTable, extAutolink]
|
||||
where opts' = [ optSmart | enabled Ext_smart ]
|
||||
exts = [ extStrikethrough | enabled Ext_strikeout ] ++
|
||||
[ extTable | enabled Ext_pipe_tables ] ++
|
||||
[ extAutolink | enabled Ext_autolink_bare_uris ]
|
||||
enabled x = extensionEnabled x (readerExtensions opts)
|
||||
|
||||
nodeToPandoc :: Node -> Pandoc
|
||||
|
|
Loading…
Add table
Reference in a new issue