From 680793803ad4f4c655d599542983048d08f7f17c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 4 May 2020 09:20:27 -0700 Subject: Fix mediawiki reader with gfm_auto_identifiers. Previously the `-` was being replaced by `_`. Closes #6335. --- src/Text/Pandoc/Readers/MediaWiki.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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: -- cgit v1.2.3