From f870a2d8ea8cca5c8cf9ca30d87e0ff758618f18 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 18 May 2017 22:50:07 +0200 Subject: 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. --- src/Text/Pandoc/Writers/LaTeX.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Text') 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 } -- cgit v1.2.3