Plugin: Preserve Code Formatting
Preserve formatting for text within
<pre> tags (other tags can be defined as well). Helps to preserve code indentation, multiple spaces, prevents WP's fancification of text (ie. ensures quotes don't become curly, etc).
Details can be found at the plugin's homepage:
All of my plugins can be found at:
Bascially, you can just paste code into
<pre>, and/or other tags you additionally specify and this plugin will:
* prevent all "wptexturization" of text (i.e. single- and double-quotes will not become curly; "--" and "---" will not become en dash and em dash,
respectively; "..." will not become a horizontal ellipsis, etc)
* optionally preserve multiple spaces (including indentations) (for the most part, that is; it changes 2+ consecutive "\n" to "\n\n" and "\t" to 3 spaces)
Keep these things in mind:
* ALL embedded HTML tags and HTML entities will be rendered as text to browsers, appearing exactly as you wrote them (including any
* By default this plugin filters both 'the_content' (post contents), 'the_excerpt' (post excerpts), and 'get_comment_text'.
It's what I have been using to formatting all the code I present on my site.