Class: Gust
Class Method Summary collapse
Class Method Details
.parse(code, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gust.rb', line 11 def parse(code, = {}) return plain_text(code) unless [:filename] case [:filename] when /.*\.png$/ then image([:url]) when /.*\.markdown$/, /.*\.md$/ then markdown(code) when /.*\.textile$/ then textile(code) else highlight(code, ) rescue plain_text(code) end end |