lib/govspeak/link_extractor.rb in govspeak-6.5.0 vs lib/govspeak/link_extractor.rb in govspeak-6.5.1
- old
+ new
@@ -18,19 +18,19 @@
map { |link| extract_href_from_link(link) }.
reject(&:blank?)
end
def extract_href_from_link(link)
- href = link['href'] || ''
- if website_root && href.start_with?('/')
+ href = link["href"] || ""
+ if website_root && href.start_with?("/")
"#{website_root}#{href}"
else
href
end
end
def document_anchors
- processed_govspeak.css('a[href]').css('a:not([href^="mailto"])').css('a:not([href^="#"])')
+ processed_govspeak.css("a[href]").css('a:not([href^="mailto"])').css('a:not([href^="#"])')
end
def processed_govspeak
doc = Nokogiri::HTML::Document.new
doc.encoding = "UTF-8"