[pmwiki-users] Re: Modified (:markup:)
Jonathan Scott Duff
duff at pobox.com
Mon Mar 21 11:43:27 CST 2005
On Mon, Mar 21, 2005 at 06:23:38PM +0100, Joachim Durchholz wrote:
> \[ (=+) ( \] | (.*?) \1 \] )
>
> The downside here is that we'll take any number of ='s in the [=..=]
> construct, including an odd one.
The upside is that you've shortened the stop-sequence by one
character: This is an unprocessed Wiki[=]Word :-)
> I don't think that's a serious problem
> though - having different semantics for [=..=] depending on whether the
> number of ='s between the brackets is even or odd sounds like a bad idea
> to me.
Yeah, it's especially a bad idea when an author is reduced to counting
the number of equal signs. BTW, now that I think about it, this is one
of the things that turned me off to the ===heading=== syntax when I
first started playing with wikis.
At least with this markup (as I understand it) authors get to choose
just how much poison they want to swallow.
> >Couldn't you special case the [==] markup? I.e. something like
> >
> > Markup('[==]', '_begin', '/\\[==\\]/se', "Keep('')");
>
> Yes, but a single regex is faster and more modular, so it's worth trying.
Sure.
-Scott
--
Jonathan Scott Duff
duff at pobox.com
More information about the pmwiki-users
mailing list