lib/grover/html_preprocessor.rb in grover-0.12.1 vs lib/grover/html_preprocessor.rb in grover-0.12.2

- old
+ new

@@ -15,16 +15,16 @@ html end def self.translate_relative_paths(html, root_url) # Try out this regexp using rubular http://rubular.com/r/hiAxBNX7KE - html.gsub(%r{(href|src)=(['"])/([^/"']([^\"']*|[^"']*))?['"]}, "\\1=\\2#{root_url}\\3\\2") + html.gsub(%r{(href|src)=(['"])/([^/"']([^"']*|[^"']*))?['"]}, "\\1=\\2#{root_url}\\3\\2") end private_class_method :translate_relative_paths def self.translate_relative_protocols(body, protocol) # Try out this regexp using rubular http://rubular.com/r/0Ohk0wFYxV - body.gsub(%r{(href|src)=(['"])//([^\"']*|[^"']*)['"]}, "\\1=\\2#{protocol}://\\3\\2") + body.gsub(%r{(href|src)=(['"])//([^"']*|[^"']*)['"]}, "\\1=\\2#{protocol}://\\3\\2") end private_class_method :translate_relative_protocols end end