File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ def initialize(response)
1616 #
1717 # @raise [InvalidURIError]
1818 def matches ( identifier , node_names : [ "link" ] )
19- results =
20- ( matches_from_headers ( identifier ) + matches_from_body ( identifier , node_names ) )
21- . compact
22- . map! { |endpoint | response . uri . join ( endpoint ) . to_s }
19+ results = ( matches_from_headers ( identifier ) + matches_from_body ( identifier , node_names ) ) . compact
2320
2421 results . uniq!
2522 results . sort!
@@ -56,7 +53,7 @@ def to_h
5653
5754 # @return [Nokogiri::HTML5::Document]
5855 def body
59- @body ||= Nokogiri ::HTML5 ( response . body )
56+ @body ||= Nokogiri ::HTML5 ( response . body , response . uri ) . resolve_relative_urls!
6057 end
6158
6259 # @return [Hash{Symbol => Array<LinkHeaderParser::LinkHeader>}]
You can’t perform that action at this time.
0 commit comments