From: Phrogz Date: 2007-02-28T04:45:08+09:00 Subject: JavaScript-based Ruby lexer/parser for CSS syntax highlighting? I'm looking for a JS library that will find (or otherwise-specified) elements on an HTML page and wrap bits in ... type elements for CSS syntax coloring of the original source. I've found two JS-based syntax highlighters ([1] and [2]), but both fail on Ruby code like: foo = "Hello #{ "World" }" They're both regexp-based, which is the problem. I'm happy to use them for quick-n-dirty highlighting, but I'm hoping that someone has written a lexer/parser that handles more complex situations like this (even if it doesn't cover every single edge case).