diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2016-09-17 16:23:47 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2016-09-17 16:23:47 -0600 |
| commit | a461547715b63621a4a75c5f884f93855fecd796 (patch) | |
| tree | d345732d7036f5bd740a68fcc1466bdfdfd51258 | |
| parent | bd6c93a248d2e1f100f5574ab72d6449d082fc21 (diff) | |
assign image_path variable when image is a gif
| -rw-r--r-- | lib/asciidoctor-pdf/converter.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asciidoctor-pdf/converter.rb b/lib/asciidoctor-pdf/converter.rb index 32c1f2ee..d07a16d8 100644 --- a/lib/asciidoctor-pdf/converter.rb +++ b/lib/asciidoctor-pdf/converter.rb @@ -826,6 +826,7 @@ class Converter < ::Prawn::Document if image_format == 'gif' warn %(asciidoctor: WARNING: GIF image format not supported. Please convert #{target} to PNG.) unless scratch? + image_path = nil valid_image = false elsif (image_path = resolve_image_path node, target, (opts.fetch :relative_to_imagesdir, true), image_format) && (::File.readable? image_path) @@ -964,7 +965,7 @@ class Converter < ::Prawn::Document end theme_margin :block, :bottom ensure - unlink_tmp_file image_path + unlink_tmp_file image_path if image_path end # QUESTION can we avoid arranging fragments multiple times (conums & autofit) by eagerly preparing arranger? |
