diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-05-04 09:20:27 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-05-04 09:20:27 -0700 |
commit | 680793803ad4f4c655d599542983048d08f7f17c (patch) | |
tree | 499c124566e6168e1a97391c1fbf1e9875f15219 /src | |
parent | 030c23e04970570ec6f6aa574da33193366d77a9 (diff) | |
download | pandoc-680793803ad4f4c655d599542983048d08f7f17c.tar.gz |
Fix mediawiki reader with gfm_auto_identifiers.
Previously the `-` was being replaced by `_`.
Closes #6335.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/MediaWiki.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs index 6bcc4735e..27c8a6069 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -401,7 +401,10 @@ header = try $ do lev <- length <$> many1 (char '=') guard $ lev <= 6 contents <- trimInlines . mconcat <$> manyTill inline (count lev $ char '=') - attr <- modifyIdentifier <$> registerHeader nullAttr contents + opts <- mwOptions <$> getState + attr <- (if isEnabled Ext_gfm_auto_identifiers opts + then id + else modifyIdentifier) <$> registerHeader nullAttr contents return $ B.headerWith attr lev contents -- See #4731: |