aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-01-11 12:16:25 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2016-01-11 12:17:49 -0800
commit8611ac56a645d7ea795027a71fde749f637b13db (patch)
tree5a2e8688adbd1566d1786d111a37f6a78ec2054d /src/Text/Pandoc/Readers
parent4db912f0f57129c91d8a1f2e4c2fd1eb12627208 (diff)
downloadpandoc-8611ac56a645d7ea795027a71fde749f637b13db.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs9
1 files changed, 5 insertions, 4 deletions
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