diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 258fdfcf4..8100a6823 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -556,7 +556,7 @@ inlineCommands = M.fromList $ tok >>= \lab -> pure (link url "" lab)) , ("includegraphics", do options <- option [] keyvals - src <- unescapeURL <$> braced + src <- unescapeURL . removeDoubleQuotes <$> braced mkImage options src) , ("enquote", enquote) , ("cite", citation "cite" NormalCitation False) @@ -1396,3 +1396,10 @@ endInclude = do co <- braced setPosition $ newPos fn (fromMaybe 1 $ safeRead ln) (fromMaybe 1 $ safeRead co) return mempty + +removeDoubleQuotes :: String -> String +removeDoubleQuotes ('"':xs) = + case reverse xs of + '"':ys -> reverse ys + _ -> '"':xs +removeDoubleQuotes xs = xs |