diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/MediaWiki.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs index c7a3bcfc7..d7f52c697 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -411,9 +411,14 @@ header = try $ do lev <- length <$> many1 (char '=') guard $ lev <= 6 contents <- trimInlines . mconcat <$> manyTill inline (count lev $ char '=') - attr <- registerHeader nullAttr contents + attr <- modifyIdentifier <$> registerHeader nullAttr contents return $ B.headerWith attr lev contents +-- See #4731: +modifyIdentifier :: Attr -> Attr +modifyIdentifier (ident,cl,kv) = (ident',cl,kv) + where ident' = map (\c -> if c == '-' then '_' else c) ident + bulletList :: PandocMonad m => MWParser m Blocks bulletList = B.bulletList <$> ( many1 (listItem '*') |