I've dabbled my toes in the open-source pool recently by making some contributions to Prism, so I figure I should probably actually use Prism for syntax highlighting on this site, right? Right?

The problem is… I'm a bit lazy. I don't want to have to change the markup in all my posts (however few there are) to be picked up by Prism instead, especially since I'd have to change everything again if I went back to the previous highlighter. Also, I haven't gotten around to contributing PowerShell support to Prism yet (again, lazy), so I'd like to be able to run both side by side easily.

What I really need is Prism to be able to recognise Auto Syntax Highlighter markup, and get in first to do the highlighting if it is a supported language.

So I wrote a little helper function to do just that; it runs before Syntax Highlighter, and converts the <pre class="brush: {language}">&hellip;</pre> style markup to the <pre><code class="language-{language}">&hellip;</code></pre> markup, but only if Prism supports that language. Here it is in all of its uncommented, Prism-highlighted glory: