<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Naatan.com - Opensource Web Developer &#187; wordpress syntax highlighting</title>
	<atom:link href="http://naatan.com/tag/wordpress-syntax-highlighting/feed/" rel="self" type="application/rss+xml" />
	<link>http://naatan.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 23 Jul 2009 02:35:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SyntaxHighlighting in Wordpress</title>
		<link>http://naatan.com/2008/11/syntaxhiglighting-in-wordpress/</link>
		<comments>http://naatan.com/2008/11/syntaxhiglighting-in-wordpress/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 03:00:08 +0000</pubDate>
		<dc:creator>Naatan</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress syntax highlighting]]></category>

		<guid isPermaLink="false">http://naatan.com/?p=245</guid>
		<description><![CDATA[One of the first plugins I installed on my new blog is the SyntaxHighlighter plugin by matt, Viper007Bond and mdawaffe, from what I understand each of these guys kind of perfected the other persons version.
Anyway, the plugin is great, it basically just incorporates the Syntaxhighlighter script by&#160;Alex Gorbatchev into Wordpress. There&#8217;s just one problem though, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a rel="nofollow" href="http://wordpress.org/extend/plugins/syntaxhighlighter/"><img class="alignright size-thumbnail wp-image-246" title="Syntaxhighlighter Plugin" src="http://naatan.com/wp-content/uploads/2008/11/screenshot-11-150x150.png" alt="Syntaxhighlighter Plugin" width="150" height="150" /></a>One of the first plugins I installed on my new blog is the <a rel="nofollow" href="http://wordpress.org/extend/plugins/syntaxhighlighter/" target="_blank">SyntaxHighlighter plugin</a> by <a rel="nofollow" href="http://wordpress.org/extend/plugins/profile/matt">matt</a>, <a rel="nofollow" href="http://wordpress.org/extend/plugins/profile/viper007bond">Viper007Bond</a> and <a rel="nofollow" href="http://wordpress.org/extend/plugins/profile/mdawaffe">mdawaffe</a>, from what I understand each of these guys kind of perfected the other persons version.</p>
<p style="text-align: justify;">Anyway, the plugin is great, it basically just incorporates the <a rel="nofollow" href="http://code.google.com/p/syntaxhighlighter/" target="_blank">Syntaxhighlighter</a> script by&nbsp;<a rel="nofollow" href="http://code.google.com/u/alex.gorbatchev/">Alex Gorbatchev</a> into Wordpress. There&#8217;s just one problem though, it does not support indentation, as the TinyMCE configuration in Wordpress doesn&#8217;t convert spaces to &amp;nbsp;&#8217;s. Also tags like <strong><em>&lt;?php</em></strong> were in my case converted to <em><strong>&amp;lt;?php</strong></em>, which is quite annoying.</p>
<p style="text-align: justify;">Long story short, I&#8217;ve done some playing around with the code and it turns out that just by removing the TinyMCE encoding / decoding functions and adding a small function to convert spaces to <em><strong>&amp;nbsp;</strong></em>&#8217;s this plugin works great!</p>
<pre title="code" class="php">

&lt;?php
&nbsp;&nbsp;&nbsp; echo 'Proof! Look.. I can use &amp;nbsp; as plain text as well.. ';
?&gt;
</pre>
<p style="text-align: justify;">Attached to this post is the modified syntaxhighlighter.php file, just install the <a rel="nofollow" href="http://wordpress.org/extend/plugins/syntaxhighlighter/" target="_blank">SyntaxHighlighter</a> plugin and replace the syntaxhighlighter.php with the one posted underneath.</p>
<p><strong>Download:</strong> <a class="downloadlink" href="http://naatan.com/wp-content/plugins/download-monitor/download.php?id=8" title="Version 1.1.1 downloaded 681 times" >syntaxhighlighter.php (681) - 3.88 KB</a></p>
<p style="text-align: justify;">I&#8217;d like to give some quick kudo&#8217;s to <em>Steve Smith</em> from <a rel="nofollow" href="http://www.thewpmag.com/" target="_blank">The Wordpress Magazine</a> for sharing his SyntaxHighlighter modifications with me, without them it would have taken me much longer to figure this one out.</p>
]]></content:encoded>
			<wfw:commentRss>http://naatan.com/2008/11/syntaxhiglighting-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
