Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

How to format Ruby code for HTML and blog posts

By Peter Cooper / June 6, 2006

You might have noticed this blog has nice, syntax colored code excerpts, as does Code Snippets. Jim Morris looks at how you can pull this off in a few different ways. One quick and easy way is to use syntax.carldr.com, a Web site that converts any Ruby code you paste into the correct syntax colored HTML. Currently I use TextMate and an external script using the syntax gem, but might use that site instead as it's easier!

Other Posts to Enjoy

Twitter Mentions