module Hamdown::Engine
Main module Mahine to compile hamdown text to html
Public Class Methods
perform(hd_text = '')
click to toggle source
It takes string with hamdown text and compile it to html
# File lib/hamdown/engine.rb 9 def self.perform(hd_text = '') 10 return '' if hd_text.size == 0 11 12 # step 1: hamdown to haml + html 13 haml_text = MdHandler.perform(hd_text) 14 15 # step 2: haml + html to html 16 html_text = HamlHandler.perform(haml_text) 17 return html_text 18 end