lib/utils/image.rb in metanorma-utils-1.4.2 vs lib/utils/image.rb in metanorma-utils-1.4.3

- old
+ new

@@ -166,10 +166,10 @@ def datauri?(uri) /^data:/.match?(uri) end def url?(url) - %r{^([A-Z]:)?/}.match?(url) + %r{^[A-Z]{2,}://}i.match?(url) end def decode_datauri(uri) %r{^data:(?<mimetype>[^;]+);base64,(?<mimedata>.+)$} =~ uri return nil unless mimetype && mimedata