Module: JekyllPreModule

Defined in:
lib/exec_tag.rb,
lib/noselect_tag.rb,
lib/pre_tag_block.rb

Defined Under Namespace

Classes: ExecTag, NoSelectTag, PreTagBlock

Class Method Summary collapse

Class Method Details

.compress(response, no_strip) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/exec_tag.rb', line 7

def self.compress(response, no_strip)
  result = response.chomp
  result = result.strip unless no_strip
  result = result.gsub('\n\n', '<br>\n')
  result = Rack::Utils.escape_html(result) unless @no_escape
  result
end