[dokuwiki] Re: parapgraphs in block syntax plugins
- From: Anika Henke <anika@xxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 03 Nov 2009 00:00:48 +0000
Anika Henke wrote:
Many plugins (e.g. blockquote) bypass this problem by setting getPType()
to 'stack' and closing one </p> before the rendered output and one
opening <p> after the rendered output. (The empty <p>s will get cleaned
up by DokuWiki automatically afterwards anyway.)
If there's no simple solution I'd rather go with the "dirty" solution
(see above, with 'stack' and closing the </p>) and wait for the fix in
the core.
I just realised, I cannot use this "hack".
At the moment I'm trying to get the blockquote plugin (or the wrap
plugin, it doesn't matter because it's the same problem) work with the
purplenumbers plugin.
The purplenumbers plugin (or any other render plugin) works only with
e.g. paragraphs made by p_open() and p_close(), of course. So, adding
paragraphs in render() instead of handle() in a syntax plugin will lead
to those paragraphs not being recognised by a render plugin.
Adding those calls to handle() could solve that problem.
I tried adding $handler->_addCall('p_close',array(), $pos); to
DOKU_LEXER_ENTER and $handler->_addCall('p_open',array(), $pos); to
DOKU_LEXER_EXIT. But any call in DOKU_LEXER_EXIT gets rendered at the
*start* of the output.
Is there any way to manipulate that?
Thanks,
Anika
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
Other related posts: