From: Daniel Moore Date: 2009-08-24T09:56:48+09:00 Subject: [QUIZ] Syntax Highlighting (#218) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this message was sent. 2. Support Ruby Quiz by submitting ideas and responses as often as you can! Visit: http://rubyquiz.strd6.com/suggestions 3. Enjoy! Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone on Ruby Talk follow the discussion. Please reply to the original quiz message, if you can. RSS Feed: http://rubyquiz.strd6.com/quizzes.rss -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Syntax Highlighting (# 218) Namo namah Rubyists, This week's quiz is to write a syntax highlighter. Your program or method will take as input unadorned Ruby code and return marked-up code. Different syntactical elements of the code should have different styles. As an additional challenge you may wish to indicate syntax errors at the point in which they occur in the code. You may choose any output style that you like. If you are unsure of what to use to colorize output, then check out Term::ANSIColor[1]. Have Fun! [1]: http://flori.github.com/term-ansicolor/ -- -Daniel http://rubyquiz.strd6.com