[pmwiki-users] Re: commented version of wikistyles.php
Patrick R. Michaud
pmichaud at pobox.com
Thu Oct 20 22:20:42 CDT 2005
On Fri, Oct 21, 2005 at 04:00:36PM +1300, John Rankin wrote:
> I'd still like to figure out how to produce
>
> <p><style color='#800080'>All of the text in this block
> is purple.
> </style></p>...
>
> instead of
>
> <p><style color='#800080'>All of the text in this block </style>
> is purple.
> </p>...
Hmm. Well, WikiStyles are defined assuming that inline (non-block)
styles don't cross markup lines. Thus, if someone wrote
%purple% All of the text in this block
is purple.
There's an assumed %% at the end of the first line, causing
"is purple" to be unstyled. To get the %purple% to apply to
the entire block, one writes
%block purple% All of the text in this block
is purple.
which produces
<p style='color:purple'> All of the text in this block
is purple
</p>
In this way, a wikistyle markup rule only ever modifies the
the current markup line being processed -- it doesn't have
to generate closing markups on subsequent lines.
Pm
More information about the pmwiki-users
mailing list