diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-10-02 22:09:20 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-10-02 22:09:20 +0200 |
commit | 1435906f097fa8d5ad08728c3b95cd2992678230 (patch) | |
tree | 8ec8366e8cc4492bc27399b2c0cd4abfffd8e34d /src/Text/Pandoc | |
parent | d0bfcbb8010f6e2b1d132e6b303ccb5024f05323 (diff) | |
download | pandoc-1435906f097fa8d5ad08728c3b95cd2992678230.tar.gz |
MediaWiki writer: transform filename with underscores in images.
`foo bar.jpg` becomes `foo_bar.jpg`. This was already done
for internal links, but it also needs to happen for images.
Closes #3052.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/MediaWiki.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs index c625b8905..df8fea5a6 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -585,7 +585,7 @@ image :: MWParser Inlines image = try $ do sym "[[" choice imageIdentifiers - fname <- many1 (noneOf "|]") + fname <- addUnderscores <$> many1 (noneOf "|]") _ <- many imageOption dims <- try (char '|' *> (sepBy (many digit) (char 'x')) <* string "px") <|> return [] |