Mar 14

WP Chili Released

Tag: ChiliAndrea Ercolino @ 23:04:20

A couple of days ago I released WP Chili, a simple WordPress plugin that installs Chili into WordPress and let’s you add client-side code highlighting to your posts, with extreme simplicity.

After activating WP Chili, it’s just a matter of wrapping your snippets into code or pre-code elements, with the programming language of the snippet as a class, like in the following example:

<pre><code class="php">
echo &quot;Hello $name&quot;;
</code></pre>

When the post reaches your readers, the snippet is unescaped by their browser and highlighted by Chili 1.9 (downloaded from your server). Your readers will see the example rendered as:

echo "Hello $name";

3 Responses to “WP Chili Released”

  1. Jeffrey04No Gravatar says:

    I am having some problem with this plugin because the highlighter stops parsing after a blank line

    http://cslai.coolsilon.com/2008/03/19/mvc-me-vs-codeigniter/2/

  2. Andrea ErcolinoNo Gravatar says:

    I’ve looked at your page and noticed some problems.

    Actually all code inside a CODE element with a “php” class is highlighted (a good thing), but outside code is not (a good thing, too).

    Any code you want Chili to highlight must go inside a CODE element…

  3. Jeffrey04No Gravatar says:

    somehow i got the problem solved. It seems that WP Chili wasn’t highlighting codes followed by a blank line is because wordpress added a paragraph tag after each blank line. I solved it by adding a   at the beginning of each blank line.

    Sorry for the double posting

Leave a Reply