aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 673deba14..241ac145a 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -166,8 +166,15 @@ mathChars = (concat <$>) $
quoted' :: (Inlines -> Inlines) -> LP String -> LP () -> LP Inlines
quoted' f starter ender = do
+ smart <- getOption readerSmart
startchs <- starter
- try ((f . mconcat) <$> manyTill inline ender) <|> lit startchs
+ ((f . mconcat) <$> manyTill inline ender) <|>
+ lit (if smart
+ then case startchs of
+ "``" -> "“"
+ "`" -> "‘"
+ _ -> startchs
+ else startchs)
doubleQuote :: LP Inlines
doubleQuote = do