Code Markup: WordPress plugin

Code Markup is a WordPress plugin that makes it easy to include program code samples in your posts. You can even include HTML markup in the code sample; Code Markup magically knows which characters should be displayed as code and which should be rendered as HTML.

For example, with Code Markup you can write:

<pre>
<code>
for (int i = 0; i < top; ++i) {
   vector<int> <span style="color:red">judy</span> = mary();
</code>
</pre>

And it will be displayed as

for (int i = 0; i < top; ++i) {
   vector<int> judy = mary();

with “judy” in red, just as you would expect. The <span> tag is rendered as normal HTML , but the <int> and i < top are displayed exactly as typed. This is very useful for times when you want to highlight a particular piece of code in your listing.

Code markup also prevents WordPress from turning your quotes into curly quotes, decrements (--) into dashes (–), and so on.

For details, many examples, download and so on, see the main Code Markup WordPress plugin page.

Share This | Comments | Permalink | Trackback | Comments feed

One response

  • Trackback | Thought Patterns | 19 December 2005
    External Links You will notice that in the posts and pages, the external links will be identified with an image: I am playing wit[...]

Post a comment

(required)
(required)
(some HTML allowed; for literal < and &, use &lt; and &amp;)
Close
E-mail It