xaviershay / enki

A Ruby on Rails blogging app for the fashionable developer - it's better than Mephisto or SimpleLog

Xavier Shay (author)
Fri Jun 19 23:39:03 -0700 2009
commit  a5c95871ecb2217063ddd2dac86005e367483162
tree    a06b67e7c3e0ec47a029ee2fcbb70e4c53dba05c
parent  672b986e4531a30af4adeab5c9e870b1b8a1f22b
enki / lib / enki_formatter.rb
100644 12 lines (11 sloc) 0.284 kb
1
2
3
4
5
6
7
8
9
10
11
12
class EnkiFormatter
  class << self
    def format_as_xhtml(text)
      Lesstile.format_as_xhtml(
        text,
        :text_formatter => lambda {|text| RedCloth.new(CGI::unescapeHTML(text)).to_html},
        :code_formatter => Lesstile::CodeRayFormatter
      )
    end
  end
end