[pmwiki-users] Empty <p> when using %defiine%. Why?

Patrick R. Michaud pmichaud at pobox.com
Thu Jun 8 09:15:15 CDT 2006


On Thu, Jun 08, 2006 at 11:58:16AM +0100, Marc Cooper wrote:
> Patrick R. Michaud said...
> > So, I'm thinking that the correct solution here would be to
> > specially handle lines that start with "%define=" and
> > contain only wikistyle definitions, since it's unlikely that
> > such markup lines are being used to affect a paragraph that
> > immediately follows.  (And in the rare case that it is being
> > used this way, it's pretty easy to adjust the wikistyle so that
> > it still works.)
> 
> In the case that caused me the problem, the following "paragraph" was a 
> table (within a float/div). I'm not presuming that you haven't thought 
> of such cases, but just in case.

It's okay, "paragraph" in this context means "normal text".  A
block wikistyle that is immediately followed by anything other 
than normal text doesn't affect the thing that follows.

> Yes, but where I am using floats (i.e. divs) containing tables and use a 
> %define at the start of the page for the initial div, it's not so easy - 

Don't worry, it'll work okay.  :-)

> Perhaps I'm stretching things a bit by using floats as a formatting 
> mechanism for the #wikitext part of the page rather than simply for 
> floating a box or an image. 

You're totally within the intended design.  There's just a bug,
which I'll fix in 2.1.11.

> However, it works - mostly - and is a 
> fantastically powerful feature. Being able to dynamically format groups 
> and pages - and allow the editors the same control on their pages - 
> without having to edit a CSS is, I think, groundbreaking.

Yes, this is why I did something like WikiStyles in the first place. :-)
It especially bugs me that CSS doesn't have a good mechanism to define
new classes based on existing classes (which WikiStyles does, of course).

Pm




More information about the pmwiki-users mailing list