summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-18 22:50:07 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-18 22:50:07 +0200
commitf870a2d8ea8cca5c8cf9ca30d87e0ff758618f18 (patch)
tree5ea4d32094c45ea6a67f64c2041b76e5fb2b2c8b /src
parent917612747dcfe3b3e1ea9d72bdbd8f2888b87cf2 (diff)
Don't render LaTeX images with data: URIs.
LaTeX can't handle these. Note that --extract-media can be used when the input contains data: URIs. Closes #3636.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 26508b7c3..31c70e99d 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -1062,6 +1062,9 @@ inlineToLaTeX (Link _ txt (src, _)) =
src' <- stringToLaTeX URLString (escapeURI src)
return $ text ("\\href{" ++ src' ++ "}{") <>
contents <> char '}'
+inlineToLaTeX il@(Image _ _ ('d':'a':'t':'a':':':_, _)) = do
+ report $ InlineNotRendered il
+ return empty
inlineToLaTeX (Image attr _ (source, _)) = do
setEmptyLine False
modify $ \s -> s{ stGraphics = True }