diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 54a39f24f..2eecf9633 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -426,6 +426,7 @@ inlineCommands = M.fromList $ pure (link url "" lab)) , ("includegraphics", skipopts *> (unescapeURL <$> braced) >>= (\src -> pure (image src "" (str "image")))) + , ("enquote", enquote) , ("cite", citation "cite" AuthorInText False False) , ("citep", citation "citep" NormalCitation False False) , ("citep*", citation "citep*" NormalCitation False False) @@ -489,6 +490,14 @@ unescapeURL ('\\':x:xs) | isEscapable x = x:unescapeURL xs unescapeURL (x:xs) = x:unescapeURL xs unescapeURL [] = "" +enquote :: LP Inlines +enquote = do + skipopts + context <- stateQuoteContext <$> getState + if context == InDoubleQuote + then singleQuoted <$> withQuoteContext InSingleQuote tok + else doubleQuoted <$> withQuoteContext InDoubleQuote tok + doverb :: LP Inlines doverb = do marker <- anyChar |