X-Git-Url: https://git.r.bdr.sh/rbdr/grita/blobdiff_plain/8b832fa6c392ca95a645b01a74e61530b6d87ff3..b7be4f63119c71b07eacc9af9e6a15db63ef65ea:/grita.rb diff --git a/grita.rb b/grita.rb index 28d903a..406dde7 100644 --- a/grita.rb +++ b/grita.rb @@ -6,6 +6,7 @@ require 'dm-validations' require 'dm-timestamps' require 'dm-migrations' require 'rqr' +require 'rdiscount' #config set :haml, :format => :html5 @@ -43,6 +44,9 @@ end get '/:grito' do @grito = Grito.first(:id => params[:grito].to_i(36)) raise "Invalid Post" if @grito.nil? + + @markdown = RDiscount.new(@grito.text) + haml :grito end