diff options
| author | John MacFarlane <[email protected]> | 2024-02-07 08:42:20 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-02-07 08:42:20 -0800 |
| commit | 719f31b26b54eba50cb482c561650748a15bb73a (patch) | |
| tree | e356dbaba8010a61d31367449a1b14f142db6f90 /src | |
| parent | c46bf5948c3fd6fa429cb576e28b8e8ccadbf883 (diff) | |
MediaWiki reader: don't make leading blanks underscores...
in image links. See #9425.
(Not a complete fix for this issue, because `:file:` and the like
are still not handled properly.)
Diffstat (limited to 'src')
| -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 2ed0dd7f9..3911fa7b9 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -654,7 +654,7 @@ imageOption = try $ char '|' *> opt <|> try (oneOfStrings ["link=","alt=","page=","class="] <* many (noneOf "|]")) addUnderscores :: Text -> Text -addUnderscores = T.intercalate "_" . splitTextBy sep +addUnderscores = T.intercalate "_" . splitTextBy sep . T.strip where sep c = isSpace c || c == '_' |
