Wordpress Plugin for Code Formatting

I like to post code periodically in my blog entries, but I haven’t found a satisfactory way to do it until now. If you use “code” tags, you wind up killing your indentation. I’ve been using “pre” tags, but they’re not really optimal. Luckily, Scott Reilly has solved this problem with a Wordpress plugin for preserving code formatting. The idea is to take code that looks would normally format like this:

(defun foo (bar)
(dolist (thing bar)
(format t "~a~%" thing)))

And let you use preserve the indentation so you can get this:

(defun foo (bar)
(dolist (thing bar)
(format t "~a~%" thing)))

Very nice and useful. Thanks Scott!

Leave a Reply

You must be logged in to post a comment.