Fixing the search #2
45 sec read
Previously I said I had to scan the hrefs for my search-mark spans, but I forgot my assets:
content.scan(/\/assets\/.*?"/).each do |s|
edited_link = s.gsub('<mark class=\'search\'>', '')
edited_link.gsub!('</mark>', '')
content.gsub!(s, edited_link)
endSadly, I didn't find a proper way to skip URLs, so I have to scan several times to remove search-mark from them :(