X-Git-Url: https://git.r.bdr.sh/rbdr/grita/blobdiff_plain/0e0a67f4f172e61592d259386aa52f0635249f64..396b06b88ac6a3afaf816fe29bce239269c3511e:/grita.rb diff --git a/grita.rb b/grita.rb index 28d903a..6e4d367 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,7 +44,10 @@ end get '/:grito' do @grito = Grito.first(:id => params[:grito].to_i(36)) raise "Invalid Post" if @grito.nil? - haml :grito + + @markdown = RDiscount.new(@grito.text) + + haml :grito, :layout => :layoutmini end error do