[pmwiki-users] How do I control $HTMLVSpace?
Patrick R. Michaud
pmichaud at pobox.com
Thu Aug 25 17:27:07 CDT 2005
On Fri, Aug 26, 2005 at 09:49:50AM +1200, John Rankin wrote:
> >Also note that in 2.0.beta55 the internal representation of "blank line"
> >has changed a bit; blank lines are now represented by '<:vspace>'
> >instead of a line containing only whitespace characters.
> >
> This looks promising. I think it will solve the problem.
> Right now, this is what we do for e.g. bullet lists:
>
> $BlockMarkups['itemize'] =
> array('<tbook:itemize><tbook:item>','</tbook:item><tbook:item>',
> '</tbook:item></tbook:itemize>',1);
>
> ## bullet lists
> Markup('^*','block','/^(\\*+)/','<:itemize,$1>');
>
> Then we do:
>
> ## honour list spacing
> Markup('skip','>^<:',
> "/<p class='vspace'><\/p>(<\/tbook:item><tbook:(?:item|term))>/",
> '$1 skip="med">');
>
> Question
> ========
> So do I instead do something like:
>
> Markup('skip','wheredoesitgo?',
> "/<:vspace>(<\/tbook:item><tbook:(?:item|term))>/",
> '$1 skip="med">');
>
> If so, what is the correct 'wheredoesitgo' sequence?
Sadly, this isn't going to quite work, because the <:vspace>
will have been on the previous markup line, and all of the block
stuff occurs after the 'split' rule, causing things to be on
separate lines.
But I think we're getting closer. Rather than worry about what
might happen if PmWiki changes the value of $HTMLVSpace, just
explicitly set it to be whatever you want. For example,
you could set:
$HTMLVSpace = "<xyz>";
and then later you can do:
## honour list spacing
Markup('skip','>^<:',
"/<xyz>(<\/tbook:item><tbook:(?:item|term))>/",
'$1 skip="med">');
Then just eliminate any <xyz>'s you see in the output. In fact,
I think they'll get eliminated anyway by your later rule that
removes non-namespace-qualified elements.
Pm
More information about the pmwiki-users
mailing list