diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-09-02 11:44:20 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-09-02 11:44:50 +0200 |
commit | b0013bfb13494648886e50840ccdd850c95c9d19 (patch) | |
tree | f283582dc43227b4fae46d37789cfdfa426cc7a3 /src | |
parent | 07c67cf8681a2450b58b1dac3abc2c8babe79935 (diff) | |
download | pandoc-b0013bfb13494648886e50840ccdd850c95c9d19.tar.gz |
PDF: Don't crash with nonexistent image.
Instead, emit the alt text, emphasized. This accords with what
the ODT writer currently does.
The user will still get a warning about a nonexistent image,
but will no longer get a LaTeX crash.
Closes #3100.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/PDF.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 4dbe1f000..534bc06bd 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -131,7 +131,8 @@ handleImage' opts tmpdir (Image attr ils (src,tit)) = do return $ Image attr ils (fname,tit) _ -> do warn $ "Could not find image `" ++ src ++ "', skipping..." - return $ Image attr ils (src,tit) + -- return alt text + return $ Emph ils handleImage' _ _ x = return x convertImages :: FilePath -> Inline -> IO Inline |