Docutils' reStructuredText, also known as reST. If you use this plugin you should disable all other markup plugins. Be sure to turn off the "WordPress should correct invalidly nested XHTML automatically" option in your Writing options. Author: Matthew scott Author URI: http://goldenspud.com/webrog/ */ // Inspired by: http://fantasy.geographic.net/~jspade/archives/restructuredtext-on-drupal/ // Set this to the path of rst2html.py $rst2html = '/usr/local/bin/rst2html.py'; function reST($text) { global $rst2html; // Look for mode-line. If it exists, use reST. Otherwise, use wpautop. $pos = strpos($text, "-*- mode: rst -*-"); if ($pos == false) { // No modeline. return wptexturize(wpautop($text)); } else { // rst modeline found. $rst = ''; $filename = '/tmp/' . rand(1,16384) . '-rest.txt'; $txtfile = fopen($filename, 'w'); fwrite($txtfile, $text); fclose($txtfile); $execstr = $rst2html . ' --no-toc-backlinks --no-doc-title --no-generator --no-source-link --no-footnote-backlinks --initial-header-level=2 ' . $filename; $rst = shell_exec($execstr); $rststart = strpos($rst, ''); $rststop = strpos($rst, ''); $rst = substr($rst, $rststart+7, $rststop - $rststart); unlink($filename); return $rst; } } // And now for the filters remove_filter('the_content', 'wpautop'); remove_filter('the_excerpt', 'wpautop'); remove_filter('the_content', 'wptexturize'); remove_filter('the_excerpt', 'wptexturize'); add_filter('the_content', 'reST'); add_filter('the_excerpt', 'reST'); ?>