Preview and pain

I’ve added a preview feature to the blog commenting system. Since applying Textile functionality to comments, it seemed the polite thing to do, especially as the output might not be immediately obvious to the uninitiated.

For the similar reasons, I’ve also changed the CSS so that paragraphs in comments are separated by a line (instead of following directly with an indentation, as in this post [not IE/Win]).

And talking of Textile, I’m struggling to fix a bug with its @ notation. The @ notation wraps code tags around its contents, and displays any contained HTML, rather than rendering it.

The problem occurs when the code fragment begins and/or ends with HTML tags and is exacerbated when the code fragment contains the tag. In both these cases the HTML is rendered instead of displayed.

I've told <a href="">Dean</a> about the bug and he's on to it. However I'm sure that Dean, and other Textile users, would love a hand from someone whose regex is better than mine (hint hint).