Noticed yesterday that the WP PHP code snippet plugin we’re using (thanks Lestat, for pointing to it) is adding an erroneous space between the < and ?. Those who are using this plugin v1.4 and readers should beware that the code examples with the start PHP tag may have an erroneous space being added to them.
Hard to find bugs like this, so it's worthwhile discussing this one here. I decided today to look through the code and see if I could fix this one really quick. Turns out that I could, see this test:
Ahh yes, good. To fix this in your Code Snippet plugin version 1.4 do the following.
STEP 1. Backup your existing copy of codesnippet.php. If something goes wrong in your modification then you just need to reFTP the original copy. Otherwise you have to try and undo your changes. That’s rarely fun.
STEP 2. Open codesnippet.php in your favorite text editor.
STEP 3. Around line 288, inside the performHighlight() function, find the line of code that looks like this:
STEP 4. Change the above code to read:
STEP 5. FTP in ASCII mode over the top of your existing codesnippet.php plugin to activate the changes.
I have emailed the author of the Code Snippet plugin, Roman Roan, about this issue. Hopefully version 1.5 will make this change that will deal with this PHP start tag issue.
Update 1:58pm PST: After posting this it occured to me that there is another annoying bug of sorts. The code is being changed to Word-style quoting which will error out the parsing as well. Make sure you don’t copy/paste the code exactly when there are double quotes (the symbol next to the enter key) in the PHP code which is not the same as Word-style double quotes. If you are getting weird parsing errors, this is likely the problem, so just type the double quotes out, don’t copy/paste them.
Update 9/19/05 10:06am PDT: As noted in the comment area by the plugin author, Roman has fixed the spacing issue in the plugin version 1.5.

Thanks for reporting, It’s now fixed in version 1.5: http://blog.enargi.com/codesnippet/
on September 19th, 2005 at 11:34 am | #Link Comment