aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authortgkokk <tgkokk@users.noreply.github.com>2017-01-05 22:24:33 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-05 21:24:33 +0100
commitf2e3e756f81378015a3d1815502f2b94361dce52 (patch)
treebef84b3f16cadb38667d3c4c6a0284fcf3cd568b /src/Text/Pandoc
parent2d8d735bb7994dbac2faaf2bb86a81f25cf38b52 (diff)
downloadpandoc-f2e3e756f81378015a3d1815502f2b94361dce52.tar.gz
MediaWiki reader: Fix quotation mark parsing (#3336)
Change MediaWiki reader's behavior when the smart option is parsed to match other readers' behavior. Fix #2012.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index df8fea5a6..76f111d53 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -671,9 +671,6 @@ strong = B.strong <$> nested (inlinesBetween start end)
end = try $ sym "'''"
doubleQuotes :: MWParser Inlines
-doubleQuotes = B.doubleQuoted . trimInlines . mconcat <$> try
- ((getState >>= guard . readerSmart . mwOptions) *>
- openDoubleQuote *> manyTill inline closeDoubleQuote )
- where openDoubleQuote = char '"' <* lookAhead alphaNum
- closeDoubleQuote = char '"' <* notFollowedBy alphaNum
-
+doubleQuotes = B.doubleQuoted <$> nested (inlinesBetween openDoubleQuote closeDoubleQuote)
+ where openDoubleQuote = sym "\"" >> lookAhead nonspaceChar
+ closeDoubleQuote = try $ sym "\""