ccampbell/rainbow — pull request #14 by mking (2012-03-28 04:31:04+00:00)
Title: ruby: Add regexes, `%Q{}` strings, bug fixes

Hi Craig,

I missed regexes, so here they are now. Also, I rounded up a few corner cases. Let me know if there's anything you want me to change. In particular I wasn't sure if you wanted the unit test. Also, wasn't sure if the "helper function" approach was right.

---

New features:

1. Regexes (`//` and `%r{}` forms)
2. Custom-quoted strings (`%Q{}`, `%q{}`, etc)
3. "unit test" demo: `demos/ruby-test.html`

Bug fixes:

1. Heredocs now start on the next free line. Previously, in `foo(< 'value'}` and `{'key' => 'value'}` would not color `key` correctly.