[dokuwiki] Re: Header Parser changed - did I break it?

  • From: Anika Henke <anika@xxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 02 May 2011 19:22:22 +0100

On 07/12/2010 15:21, Andreas Gohr wrote:
I just pushed a patch that enabled a feature I needed in a plugin and
might be interesting for others (Anika, you might want to make use of
that in the wrap plugin).

The commit note and the patch should be explanation enough:
https://github.com/splitbrain/dokuwiki/commit/9fa736b0317d46fdfb2025895fa0288fd736ca08

Now, I'm wondering why it was implemented as it was in the first
place. Why preConnect() instead of connectTo()? It was like this in
Harry's orginal parser implementation and it was never changed. If
anyone has an idea what I might have broken by the change, please
speak up now ;-)

I just checked if I can use it in the wrap plugin. I don't know if anything else would break, but this change definitely doesn't mean you can have headlines in other syntax now.

When I add 'baseonly' to the allowed types, I can add headlines inside WRAP, e.g.
<WRAP box>
===== Headline =====
Text ...
</WRAP>

BUT ... the result is undesirable, because headlines also open and close sections. See the result for the above example:

<div class="level1">
<div class="wrap_box">
</div><!-- I guess this is supposed to close div.level1? -->
<h2 class="sectionedit2"><a name="big_headline" id="big_headline">Big Headline</a></h2>
<div class="level2">
<p>
Text ...

I guess there is no easy way to fix this, right?

Thanks,
Anika
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: