Class: Gollum::Filter::PlainText

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

Overview

Plain Text

Render plain text documents in a <pre> block without any special markup.

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



9
10
11
# File 'lib/gollum-lib/filter/plain_text.rb', line 9

def extract(data)
  @markup.format == :txt ? "<pre>#{CGI.escapeHTML(data)}</pre>" : data
end

#process(data) ⇒ Object



13
14
15
# File 'lib/gollum-lib/filter/plain_text.rb', line 13

def process(data)
  data
end