lib/metanorma/output/utils.rb in metanorma-1.3.1 vs lib/metanorma/output/utils.rb in metanorma-1.3.2
- old
+ new
@@ -5,10 +5,11 @@
module Utils
class << self
def file_path(url_path)
file_url = url_path
file_url = "file://#{url_path}" if Pathname.new(file_url).absolute?
- file_url = "file://#{Dir.pwd}/#{url_path}" unless %r{^file://} =~ file_url
+ %r{^file://}.match?(file_url) or
+ file_url = "file://#{Dir.pwd}/#{url_path}"
file_url
end
end
end
end