Module: Redcarpet::Socialable::Mentions

Included in:
Redcarpet::Socialable
Defined in:
lib/redcarpet/socialable/mentions.rb

Instance Method Summary collapse

Instance Method Details

#postprocess(document) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/redcarpet/socialable/mentions.rb', line 5

def postprocess(document)
  # Disable postprocess-ing for legacy renderer
  unless respond_to?(:safe_replace)
    document = process_mentions(document)
  end

  if defined?(super)
    super(document)
  else
    document
  end
end