Class: Gollum::Filter::Render

Inherits:
Gollum::Filter show all
Defined in:
lib/gollum-lib/filter/render.rb

Instance Method Summary collapse

Methods inherited from Gollum::Filter

#initialize

Methods included from Helpers

#trim_leading_slash

Constructor Details

This class inherits a constructor from Gollum::Filter

Instance Method Details

#extract(data) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/gollum-lib/filter/render.rb', line 4

def extract(data)
  begin
    data = GitHub::Markup.render(@markup.name, data)
    if data.nil?
      raise "There was an error converting #{@markup.name} to HTML."
    end
  rescue Object => e
    data = html_error("Failed to render page: #{e.message}")
  end

  data
end

#process(data) ⇒ Object



17
18
19
# File 'lib/gollum-lib/filter/render.rb', line 17

def process(data)
  data
end