[dokuwiki] Re: unwanted line breaks if using ifauth-plugin

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 05 Jul 2006 09:56:13 +0100

Otto Vainio wrote:

Oliver Geisen wrote:
Hello,

if i write something like:

<ifauth @grp1>  * This is for group 1</ifauth>
<ifauth @grp2>  * This is for group 2</ifauth>
<ifauth @grp3>  * This is for group 3</ifauth>

it will result in empty lines where the current user has no access to.
Is there a way to teach ifauth plugin to behave like there is nothing, if authorization is not given ?
If so, even empty lines in the wiki pagesource would not result in empty lines in the rendered page.

Hi

I have tried to search a solution to this. The same problem appears, when ifauth is used inside a table. The empty line is shown since dokuwiki starts a new <ul> section for each ifauth line. That is because I call p_render for each <ifauth>.

So the problem is that the lines in a unordered list are part of a bigger hmm.. group. Is there a way to build a syntax plugin that would leave the lines for some other parser with a bigger sort number?

Just ideas off the top of my head and without any testing ...
- Can you use an exit pattern which includes the new line, if only whitespace+new line follows the </ifauth>?
- Or can you use an internal "pattern" (rather than enter, special or exit) which will match </ifauth>\s*<ifauth>?


Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: