Syntax 0.7
Back in January I released a simple little library to do syntax highlighting of Ruby, XML, and YAML texts. I only did it because I wanted to be able to contribute syntax highlighted code blocks to Hieraki. However, it has since caught on. Carl Drinkwater writing a web interface for it (as of right now, this appears to be using the 0.5 version of Syntax, so expect some errors in how it highlights Ruby code). And I know of at least one other project in the works that is planning on using Syntax.
So, with all the new attention, I figured it was time to revisit it. The original release (versioned 0.5.0) was functional, but not particularly robust. Carl in particular discovered several cases where it failed to highlight correctly. And it didn’t handle heredocs very well at all, especially multiple heredocs on a single line.
Then Florian Groß comes along and wants regions—syntax groups that span tokens of different groups. (Think of strings, which can contain escape sequences and interpolated expressions.)
So, now you have version 0.7. The Ruby lexer has seen some large improvements, and is scads more stable and robust than it was before. Its heredoc support, in particular, rocks. (If I do say so myself.) Lastly, it also sports a brand-spaking-new users manual.
So, skip on over to RubyForge and have a look at the latest version. Or, just install the gem. You can also get it from my subversion repository, directly. Whatever you prefer, send me feedback. And new syntax modules.