Method: Rabbit::Parser::Ext::Image::Private.local_path_to_image_filename

Defined in:
lib/rabbit/parser/ext/image.rb

.local_path_to_image_filename(canvas, path) ⇒ Object


113
114
115
116
117
118
119
120
121
122
123
# File 'lib/rabbit/parser/ext/image.rb', line 113

def local_path_to_image_filename(canvas, path)
  path = Pathname.new(Filename.new(path).encode)
  return path.to_s if path.absolute?

  expanded_path = canvas.full_path(path.to_s)
  if start_with_scheme?(expanded_path)
    uri_string_to_image_filename(canvas, expanded_path)
  else
    expanded_path
  end
end