Module: Lookbook::OutputHelper

Defined in:
app/helpers/lookbook/output_helper.rb

Instance Method Summary collapse

Instance Method Details

#beautify(source, language = "html") ⇒ Object



11
12
13
# File 'app/helpers/lookbook/output_helper.rb', line 11

def beautify(source, language = "html")
  Lookbook::CodeFormatter.beautify(source, language)
end

#highlight(source, language, opts = {}) ⇒ Object



7
8
9
# File 'app/helpers/lookbook/output_helper.rb', line 7

def highlight(source, language, opts = {})
  Lookbook::CodeFormatter.highlight(source, language, opts)
end

#markdown(text = nil, &block) ⇒ Object



3
4
5
# File 'app/helpers/lookbook/output_helper.rb', line 3

def markdown(text = nil, &block)
  Lookbook::Markdown.render(block ? capture(&block) : text)
end