tnantoka/wizu

View on GitHub
app/models/filters/remove_fragment.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Filters
  class RemoveFragment < HTML::Pipeline::Filter
    def call
      doc.search('span.fragment').each do |s|
        doc.at("a[href=\"##{s[:id]}\"]").remove
        s.remove
      end
      doc
    end
  end
end