lib/jekyll/polyglot/patches/jekyll/site.rb
# a regex that matches relative urls in a html document
# matches href="baseurl/foo/bar-baz" and others like it
# avoids matching excluded files.  prepare makes sure
# that all @exclude dirs have a trailing slash.
a regex that matches relative urls in a html document
matches href="baseurl/foo/bar-baz" and others like it
avoids matching excluded files.  prepare makes sure
that all @exclude dirs have a trailing slash.
a regex that matches relative urls in a html document matches href = " baseurl / foo / bar - baz " and others like it avoids matching excluded files . prepare makes sure that all @exclude dirs have a trailing slash .
def relative_url_regex
      regex = ''
      (@exclude).each do |x|
        regex += "(?!#{x})"
      end
      (@languages).each do |x|
        regex += "(?!#{x}\/)"
      end
      %r{href=\"?#{@baseurl}\/((?:#{regex}[^,'\"\s\/?\.#]+\.?)*(?:\/[^\]\[\)\(\"\'\s]*)?)\"}
    end
def relative_url_regex regex = '' ( @exclude ) . each do | x | regex += "(?!#{x})" end ( @languages ) . each do | x | regex += "(?!#{x}\/)" end %r{ href= \" ? #{ @baseurl } \/ ((?: #{ regex } [^,' \" \s \/ ? \. #]+ \. ?)*(?: \/ [^ \] \[ \) \( \" \' \s ]*)?) \" } end
a regex that matches relative urls in a html document
matches href="baseurl/foo/bar-baz" and others like it
avoids matching excluded files.
a regex that matches relative urls in a html document matches href = " baseurl / foo / bar - baz " and others like it avoids matching excluded files .