Kirkman wrote:This solution is almost ideal, except that it disallows inline javascript.
I'm hoping to find a solution that allows inline javascript, inline handlebars templates, and proper syntax coloring for each.
Seems like the way to accomplish this might be to edit the regex in line 286 such that it excludes any script that with an opening tag that contains type="text/x-handlebars-template".
Does anyone know how to do that?
I did something similar with graphviz. Don't want to retype the explanation, so I'll link you to the StackOverflow where I did already

They wanted to highlight embedded html in an AngularJS directive, but what they wanted is the same.
The short version is I think it's possible, you would just have to create the appropriate begin regex as you had mentioned and include the appropriate source.
http://stackoverflow.com/questions/1543 ... 2#15441612