<?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"
	>

<channel>
	<title>DEAN LEE:/DEV/BLOG &#187; syntax-highlighting</title>
	<atom:link href="http://www.deanlee.cn/tag/syntax-highlighting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deanlee.cn</link>
	<description>mount /dev/brain &#124;&#124; tail -f /var/log/thoughts &#62;&#62; /pub/www</description>
	<pubDate>Fri, 30 Dec 2011 13:27:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Google Code Prettify for wordpress</title>
		<link>http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/</link>
		<comments>http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 15:03:21 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[code-snippets]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[source-code]]></category>

		<category><![CDATA[syntax-highlighting]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/technology/google-code-prettifer-for-wordpress/</guid>
		<description><![CDATA[This small wordpress plugin enable syntax highlighting of code snippets in your post using Google Code Prettify.
Notice: you will need to have JavaScript enabled in your browser for this to work.
I had developed another Source Code syntax highlighting plugin using Geshi before,but they are totally different things.with Geshi,code is parsed on the server side,no javascript [...]]]></description>
			<content:encoded><![CDATA[<p>This small wordpress plugin enable syntax highlighting of code snippets in your post using <a href="http://code.google.com/p/google-code-prettify/">Google Code Prettify</a>.</p>
<p><font color="#ff0000">Notice:</font> you will <strong>need</strong> to have <strong>JavaScript enabled</strong> in your browser for this to work.</p>
<p>I had developed another <a href="http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/">Source Code syntax highlighting plugin</a> using <a href="http://qbnz.com/highlighter/">Geshi</a> before,but they are totally different things.with Geshi,code is parsed on the server side,no javascript is needed.</p>
<p>It&#8217;s hard to say which is the better,choose one based on your own needs.</p>
<p class="download"><a title="Download" href="http://www.deanlee.cn/downloads/google_code_prettify_v1.1.zip">Download Google Code Prettify for wordpress v1.1</a></p>
<p><strong>Installation</strong></p>
<p>This plugin requires <a href="http://www.wordpress.org">WordPress</a> v.2.0 or later.</p>
<ol>
<li>unzip and upload the files to your wp-content/plugins/ directory.</li>
<li>Activate the plugin by logging into your WordPress administration panel, going to &lsquo;Plugins&rsquo;, then clicking the&nbsp; &#8216;Activate&#8217;&nbsp; button for&nbsp; &#8216;Google Code Prettify&#8217;.</li>
<li>Done,enjoy it.</li>
</ol>
<p><strong>Usage</strong></p>
<p>Put code snippets in &lt;pre class=&quot;prettyprint&quot;&gt;&#8230;&lt;/pre&gt; or &lt;code class=&quot;prettyprint&quot;&gt;&#8230;&lt;/code&gt; and it will automatically be pretty printed.</p>
<p><strong>Example</strong></p>
<p>Bash</p>
<pre class="prettyprint">
#!/bin/bash

# Fibonacci numbers
# Writes an infinite series to stdout, one entry per line
function fib() {
  local a=1
  local b=1
  while true ; do
    echo $a
    local tmp=$a
    a=$(( $a + $b ))
    b=$tmp
  done
}

# output the 10th element of the series and halt
fib | head -10 | tail -1</pre>
<p><a href="http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html">More examples</a></p>
<p><strong>FAQ</strong> (from <a title="http://code.google.com/p/google-code-prettify/" href="http://code.google.com/p/google-code-prettify/" target="_blank">http://code.google.com/p/google-code-prettify/</a>)</p>
<ol>
<li><strong>Which languages does it work for?<br />
    </strong>The comments in <tt>prettify.js</tt> are authoritative but the lexer should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk and a decent subset of Perl, but, because of commenting conventions, doesn&#8217;t work on Smalltalk, Lisp-like, or CAML-like languages.</li>
<li><strong>How do I specify which language my code is in?<br />
    </strong>There&#8217;s no way to tell it which language because would complicate the interface. If it doesn&#8217;t guess the language properly, that&#8217;s a bug.</li>
<li><strong>Which browsers does it work with?<br />
    </strong>It&#8217;s been tested with IE 6, Firefox 1.5 &amp; 2, and Safari 2.0.4. Look at <a href="http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html">the test page</a> to see if it works in your browser.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Source Code syntax highlighting plugin for WordPress (V1.2)</title>
		<link>http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/</link>
		<comments>http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/#comments</comments>
		<pubDate>Sun, 22 Oct 2006 07:39:18 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[code-snippets]]></category>

		<category><![CDATA[geshi]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[syntax-highlighting]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/2006/10/22/source-code-syntax-highlighting-plugin-for-wordpress/</guid>
		<description><![CDATA[Introduction
This WordPress plugin using Geshi to highlight source code in a wide range of popular languages.it aims to be a simple but powerful code highlighting plugin, with the following goals:

Easy to use.
Support for a wide range of popular languages.
Customizable output formats.

Installation
This plugin requires WordPress v.1.5 or later.

Download Dean&#8217;s Code Highlighter v1.2&#160; and unzip it.
Upload the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>This WordPress plugin using <a href="http://qbnz.com/highlighter/">Geshi</a> to highlight source code in a wide range of popular languages.it aims to be a simple but powerful code highlighting plugin, with the following goals:</p>
<ul>
<li>Easy to use.</li>
<li>Support for a wide range of popular languages.</li>
<li>Customizable output formats.</li>
</ul>
<p><strong>Installation</strong></p>
<p>This plugin requires <a href="http://www.wordpress.org">WordPress</a> v.1.5 or later.</p>
<ol>
<li>Download <a href="http://www.deanlee.cn/downloads/deans_code_highlighter_v1.2.zip">Dean&#8217;s Code Highlighter v1.2</a>&nbsp; and unzip it.</li>
<li>Upload the plugin to your plugin directory (wp-content/plugins).</li>
<li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress.</li>
<li>Modify the stylesheet file geshi.css to get the coloring you prefer.</li>
</ol>
<p><strong>usage</strong></p>
<p>Use the &quot;pre&quot; tag and add the programming language you want to use as a parameter. Example:. &lt; pre lang=&quot;php&quot; &gt;your code here &#8230; &lt; /pre &gt;. for example: &lt;pre lang=&quot;php&quot;&gt; function hello_world(){ echo &quot;hello world&quot; }&lt;/pre&gt; after highlighting:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">function</span> hello_world<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;hello world&quot;</span>;<br />
<span class="br0">&#125;</span></div>
<p>You can <a href="http://www.deanlee.cn/2006/09/24/convert-unicode-to-utf8/">see a Living demo at here.</a></p>
<p><strong>Revision History</strong></p>
<ul>
<li>version 1.2 (2007-08-28)</li>
<li>version 1.1
<ul>
<li>Add the ability to strips unwanted tags in your code snippets added by WYSWYG editors.</li>
</ul>
</li>
<li>version 1.0 initial version</li>
</ul>
<p><strong>See also</strong></p>
<p>There is another plugin may interest you:<a href="http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/">Google Code Prettify for wordpress</a>.it&#8217;s a javascript syntax highlighter based on Google Code Prettify.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

