[pmwiki-users] PmWiki/ConditionalMarkup

Patrick R. Michaud pmichaud at pobox.com
Thu Mar 9 14:30:39 CST 2006


On Thu, Mar 09, 2006 at 12:34:46PM -0700, H. Fox wrote:
> On 3/9/06, Hans <design at softflow.co.uk> wrote:
> > In fact you can write
> >
> > ->[@preformatted text
> > preformatted text
> > preformatted text
> > @]
> >
> > no space needed between -> and [@
> 
> Both appear identical, but originally Pm said to use the space because
> the results without it were not predictable (or somethig like that). 
> I've been using the space "just to be sure".
> 
> <searches...>
> 
> http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/16502/match=not+sure+about+this+one

Actually, my "not sure about this one" was addressing the question
of "should ->[@ be the standard"  (versus a plain [@...@] with spaces), 
and not to the existence of a space between -> and [@ .  Both "-> [@"
and "->[@" should work the same.

> Earlier in the week I asked Pm to make the first two examples on that
> page look the same, but he declined for now because it might break
> existing content.

Yes, but I'm beginning to dislike the inconsistency.  My
suggestion is to start formatting things in the way that will
work best *for authors*, and then we'll adjust the [@...@]
markup to make it look right in skins.

> I think the last one would be a reasonable default wikistyle so we could use
> 
> %code% [@
> Bla bla
> @]
> 
> Is that any more author-friendly than
> 
> -> [@
> Yadda yadda
> @]
> 
> though?  In one way it is.  An author can more easily add additional
> style attributes to the wikistyle version.  (Otherwise it
> double-applies the wikistyle.)

We can always do "-> %code% [@ ... @]" -- it double-applies
the wikistyle if %code% has "apply=block" in it.  Apply=block
means to apply the style to any HTML block element on the line,
and since that includes both <div> and <pre> (as well as lists),
it makes it appear as though it's being applied twice.  Define %code%
with apply=div or apply=pre and it should be applied only once.

Pm




More information about the pmwiki-users mailing list