Searching for Signal

the n01se blog

using the reStructuredText plugin for WordPress

The first thing I did after migrating content from our old blog was to install the reStructuredText WordPress plugin. The second thing I did was convert a few entries to use it. And the third thing, well, the third thing was to spend a couple hours trying to figure out why it insisted on rendering headings as <h1> instead of <h3> even though I had set $rst2html_options = '--initial-header-level=3 --no-doc-title ...'.

Finally found it! $rst2html_options is global but the rendering function was using an unitialized local value. Here's the patch:

--- rest.php.old 2008-05-15 08:14:52.000000000 -0700
+++ rest.php     2008-05-15 08:15:00.000000000 -0700
@@ -76,6 +76,7 @@
 function reST($text) {
   global $rst2html;
+  global $rst2html_options;
   global $cachedir;
   global $usepipes;
   global $tmpdir;

I'll try to get this upstream, but the launchpad project doesn't provide any contact information and claims it doesn't use a bug database. Best I've been able to figure out so far is to leave a comment here.