[ewiki] Line formatting hook broken, $post is not properly initialized (trivial fix)

Hey,

I've been trying to use the css_singleat plugin, but using it made "</div>"'s
appear at the end of all of my lines. Investigating this, it appears that in
the function ewiki_format(), at line 2128, all the format_line plugins are
called:
            #-- call wiki source formatting plugins that work on current line
            if ($pf_line) {
               foreach ($pf_line as $pf) $pf($out, $line, $post);
            }  
But, $post is never really initialized. So everything a plugin adds to $post
will be put at the end of _all_ subsequent lines. To fix this, simply put
            $post = '';
before the above lines, so $post will only be used for the current line.

Gr.

Matthijs

Other related posts: