Forum: Redcloth try.redcloth.org

Posted by Jason Garber (jgarber)
on 2009-04-23 07:46
(Received via mailing list)
I've been wanting to put up a RedCloth "dingus" like you find on
Textism, but always thought it would take too much time and would be
one more app taking up resources.

Then I got a reminder email from Heroku that I wasn't doing anything
with my beta invitation.  So I took them up on it.  I wrote a simple
Sinatra app, did a git push heroku, and basked in its glory.

Nothing fancy, but it's incredibly fast.  Check it out: 
http://try.redcloth.org/

I plan to style it and integrate it into the reference manual (try out
the examples via AJAX) at some point, but not bad for a quick hack, eh?

Jason

P.S.: Here's the app:

require 'rubygems'
require 'sinatra'
require 'redcloth'

get '/' do
   haml :index
end

post '/' do
   RedCloth.new(params[:text]).to_html
end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.