Currently, such code renders like this:
I would prefer to have that code rendered like this (like Eclipse does with the GWT plugin):
The means of choosing the syntax of the nested part should probably be manual, e.g., by using some kind of markup. Detecting the syntax of the nested part automatically would be very hard.
Update: I fiddled a bit with Prettify and got it to produce nested highlighting without changing anything on the Prettify side: http://jsbin.com/lupuvonapu/2/edit?html,output
I tested the result with Firefox 17esr, IE10, Opera, and Safari, getting the desired result in all cases.
The approach used in the example supports only 1 level of nesting, and requires Prettify to run twice (once for the outer code, and again for nested code). I marked the nested code by adding a nested
<pre> tag to specify its language syntax. This way of doing it certainly leaves room for improvement, but I hope it helps the idea along.