R Syntax highlighting problems on wordpress.com?

I recently tried to use R Syntax highlighting on this wordpress.com blog, as shown in Tal Galili’s blog post.

Unfortunately it didn’t seem to work well (and I lost quite a bit of work as a result). When I used too many blocks of R source code things got messy and code in my blog post would get lost/modified. When trying to redo the lost part of the blog post this happened again, so it wasn’t a one off.

Span tags would appear in the code and would then stay in my editor. r-highlighting-error
I assume there is a workaround as R Syntax highlighting in wordpress.com has been around for many years, but for now I’ll stick to pasting code as preformatted text.

The whole thing wasn’t helped by the fact that wordpress.com doesn’t store the history of your blog post edits, at least not until you have scheduled a blog post. a normal wordpress installation on your own web space gives you access to previous drafts.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s