Just a small announcement that a WordPress plugin has been committed for Prism Syntax Highlighter. I liked the plugin as it is really lightweight and fast.
The new plugin will allow you to post markup without manually changing the code to post online. What is required is just installation and nothing. Yes, nothing at the time of posting. If you use text mode of Editor in plugin then nothing need to be done. If you like Visual Mode then just paste your code in Text Mode of WordPress Editor and, press Draft to go back to Visual Mode. If Auto Save happens then also the markup will be transferred to escaped code that will look exactly you posted in WordPress.
The Plugin Effect:
The Markup Entered in Text Mode:
The effect of WordPress Plugin “Escape HTML For Prism Syntax Highlighter” on code:
Problem in shifting to newer version of Alex’s tool is that I am using different syntax to highlight code. My syntax of code is
<pre title="code" class="html"></pre>. Now it needs in this way:
<pre class="brush: js">. For this to use or any plugin, I need to change all old post. Though task!
For prism, I am thinking of doing something. I need to write a script which takes old post data and replace all
<pre class="xxxx"> to <pre><code class="language-xxxx"> and <code></pre> to
</code></pre>. Lets see when I would do that. Once done I may update it here so that it may help others to tweak and use that for other syntax highlighter.