fmchris
Member
Posted 3 years ago #
I'm trying to post code snippets on my blog. However, when I posted something like:
<pre>
<?php
echo("Hi!");
?>
</pre>
It added a space in the PHP tag, like so:
< ?php
I tried both HTML entities (≶) and the actual < character, but it added a space either way. It is wrapped inside a <pre> tag.
I'd recommend using one of the code plugins if you want to post code examples on your blog. I use WP-Syntax.
fmchris
Member
Posted 3 years ago #
I've tried using those, and it still does it regardless, even in the highlighter.
It's something that the post editor is doing, I think. Because as soon as I save the post it adds the space.
vexiphne
Member
Posted 3 years ago #
wordpress 2.7 is still doing this, causing some trouble trying to get any syntax highlighters to work
vexiphne
Member
Posted 3 years ago #
I figured it out, if you have the "correct xhtml tags" on writing -> settings, it will add a space.