lib/reverse_asciidoctor/converters/img.rb in reverse_adoc-0.2.6 vs lib/reverse_asciidoctor/converters/img.rb in reverse_adoc-0.2.7

- old
+ new

@@ -24,11 +24,11 @@ dest_dir = Pathname.new(ReverseAsciidoctor.config.destination).dirname images_dir = dest_dir + 'images' FileUtils.mkdir_p(images_dir) - ext, image_src_path = determine_image_src_path(imgdata) + ext, image_src_path = determine_image_src_path(imgdata, src) image_dest_path = images_dir + "#{image_number}.#{ext}" # puts "image_dest_path: #{image_dest_path.to_s}" # puts "image_src_path: #{image_src_path.to_s}" @@ -36,10 +36,10 @@ image_number_increment image_dest_path.relative_path_from(dest_dir) end - def determine_image_src_path(imgdata) + def determine_image_src_path(imgdata, src) return copy_temp_file(imgdata) if imgdata ext = File.extname(src).strip.downcase[1..-1] [ext, Pathname.new(ReverseAsciidoctor.config.sourcedir) + src] end