From 8611ac56a645d7ea795027a71fde749f637b13db Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 11 Jan 2016 12:16:25 -0800 Subject: Fixed regression in latex smart quote parsing. Closes #2645. In cases where a match was not found for a quote, everything from the open quote to the end of the paragraph was being dropped. --- src/Text/Pandoc/Readers/LaTeX.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc/Readers/LaTeX.hs') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index d2e8d9d17..4b30725aa 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -179,10 +179,11 @@ quoted' f starter ender = do then do ils <- many (notFollowedBy ender >> inline) (ender >> return (f (mconcat ils))) <|> - lit (case startchs of - "``" -> "“" - "`" -> "‘" - _ -> startchs) + (<> mconcat ils) <$> + lit (case startchs of + "``" -> "“" + "`" -> "‘" + _ -> startchs) else lit startchs doubleQuote :: LP Inlines -- cgit v1.2.3