Class: PostStripper

Inherits:
Object
  • Object
show all
Defined in:
app/models/post_stripper.rb

Overview

We strip posts before detecting mentions, oneboxes, attachments etc. We strip those elements that shouldn’t be detected. For example, a mention inside a quote should be ignored, so we strip it off.

Class Method Summary collapse

Class Method Details

.strip(nokogiri_fragment) ⇒ Object



7
8
9
10
11
# File 'app/models/post_stripper.rb', line 7

def self.strip(nokogiri_fragment)
  run_core_strippers(nokogiri_fragment)
  run_plugin_strippers(nokogiri_fragment)
  nokogiri_fragment
end