lib/utils/image.rb in metanorma-utils-1.4.4 vs lib/utils/image.rb in metanorma-utils-1.4.4.1

- old
+ new

@@ -122,21 +122,17 @@ end end # sources/plantuml/plantuml20200524-90467-1iqek5i.png # already includes localdir + # Check whether just the local path or the other specified relative path + # works. def datauri(uri, local_dir = ".") return uri if datauri?(uri) || url?(uri) || absolute_path?(uri) - # Check whether just the local path or the other specified relative path - # works. path = [uri, File.join(local_dir, uri)].detect do |p| File.exist?(p) ? p : nil end - datauri1(path) - end - - def datauri1(path) unless path && File.exist?(path) warn "Image specified at `#{uri}` does not exist." return uri # Return original provided location end