git.iko.soy/typeable/pandoc
on master help sign in
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.

commitf2e3e756f81378015a3d1815502f2b94361dce52 authortgkokk <tgkokk@users.noreply.github.com> dateThu 5 Jan 2017, 22:24 (10 years ago) parent2d8d735
1 file changed+3−6
src/Text/Pandoc/Readers/MediaWiki.hs+3−6
src/Text/Pandoc/Readers/MediaWiki.hs+3−6
@@ -671,9 +671,6 @@ strong = B.strong <$> nested (inlinesBetween start end)
671671 end = try $ sym "'''"
672672
673673doubleQuotes :: MWParser Inlines
674−doubleQuotes = B.doubleQuoted . trimInlines . mconcat <$> try
675− ((getState >>= guard . readerSmart . mwOptions) *>
676− openDoubleQuote *> manyTill inline closeDoubleQuote )
677− where openDoubleQuote = char '"' <* lookAhead alphaNum
678− closeDoubleQuote = char '"' <* notFollowedBy alphaNum
679−
674+doubleQuotes = B.doubleQuoted <$> nested (inlinesBetween openDoubleQuote closeDoubleQuote)
675+ where openDoubleQuote = sym "\"" >> lookAhead nonspaceChar
676+ closeDoubleQuote = try $ sym "\""