How to keep WordPress from borking your post
Sometimes you just want to post a code snippet or some xml on your blog, but WordPress borks the formatting. So we installed the iG Syntax Hilighter, which mostly works great. It uses GeSHi under the hood.
But sometimes, the syntax highlighter does too much highlighting. I wrote a minimal GeSHi language file for ‘nocode’, which basically lets me use the syntax highlighter like a glorified pre tag. No more worrying about wptexturize() pulling a Swedish Chef on your post! Here is the language file if you want to use it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <?php /************************************************************************************* * nocode.php * ------- * Author: rajbot * I wanted a <pre> that didn't fuck everything up.. ************************************************************************************/ $language_data = array ( 'LANG_NAME' => 'NOCODE', 'COMMENT_SINGLE' => array(), 'QUOTEMARKS' => array(), 'KEYWORDS' => array(), 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array(), 'SCRIPT_DELIMITERS' => array( ) ); ?> |

nocode is the new nowiki
[nocode]nocode is the new[/nocode]