I have a self-hosted WP install, and have been using codecolorer (and have tried a few others along the way) to highlight R syntax. Looks nice, too.
The problem is that R uses a
<- symbol instead of
= when assigning objects (on pretty much every single line), and when you switch from 'Visual' to 'HTML' while editing a post it will mangle the code -
<-; worse, sections of the code will disappear.
It would be possible to use
= for the 'assign' command but it's not, strictly-speaking, correct. At the moment I have to do all the pretty writing and inserting of images in WYSIWYG 'visual' mode, then switch to HTML just before I post to fix up the R code, and then be careful never to switch back again. Ever.
Any fixes for this behaviour?
EDIT: examples! Putting this into the Visual editor:
[cc] lorum <- ipsum [/cc]
Produces the following in the final post:
lorum <- ipsum
Going back to HTML mode and putting a
<- code worked for the final post but then I could never switch back to Visual without the
< being interpreted as part of a tag.