lib/asciidoctor/helpers.rb in asciidoctor-2.0.18 vs lib/asciidoctor/helpers.rb in asciidoctor-2.0.19

- old
+ new

@@ -118,11 +118,17 @@ # with a URI prefix (e.g., http://). No validation of the URI is performed. # # str - the String to check # # returns true if the String is a URI, false if it is not - def uriish? str - (str.include? ':') && (UriSniffRx.match? str) + if ::RUBY_ENGINE == 'jruby' + def uriish? str + (str.include? ':') && !(str.start_with? 'uri:classloader:') && (UriSniffRx.match? str) + end + else + def uriish? str + (str.include? ':') && (UriSniffRx.match? str) + end end # Internal: Encode a URI component String for safe inclusion in a URI. # # str - the URI component String to encode