[pmwiki-users] Protected block markup problem

Patrick R. Michaud pmichaud at pobox.com
Wed Mar 9 01:58:21 CST 2005


On Wed, Mar 09, 2005 at 08:21:26AM +0100, Dominique Faure wrote:
> (:directive a=1 b=2 c="HTMLStyleFmt":)  [=
> foo bar baz
> =]
> 
> args: ' a=1 b=2 c="2L"'
> data: '
> foo bar baz
> '
> 
> Could you explain me why specific values for 'c' parameters (internal 
> PmWiki variable names?) seem to disturb block protection, and how may I 
> have this work?

It's not the fact that it's an internal PmWiki variable name, it's
because HTMLStyleFmt is a WikiWord, and WikiWord processing 
currently takes place before block processing.  So, the strange
characters you're getting there are the result of having been
converted to a link.

You need to process the directive prior to wikiwords (I suggest
"directives", or else come up with a slightly different way of handling it.

Which brings up a larger point -- should we move wikiword and link
processing to even later in the sequence than it is now?  
PmWiki 1 performed processing in the following sequence:

    directives
    links ([[...]], url, and wikiword)
    block
    inline markup
    wikistyles

This sequence was largely dictated by the limitations of v1's data structures,
as well as the markup sequences themselves.  However, with v2, we discovered
that we could usefully move inline markups to occur before link processing
(to allow inline markup in [[target | ''text'']]), so that the sequence is
now:

    directives
    inline markup
    links ([[...]], url, and wikiword)
    block
    wikistyles

I'm wondering if we can now shift block markups to occur before link
processing, or perhaps just wikiword processing, resulting in:

    directives
    inline markup
    block markup
    links ([[...]], url, and wikiword)
    wikistyles

or perhaps

    directives
    inline markup
    links ([[...]])
    block markup
    links (bare url and wikiword)
    wikistyles

This would eliminate a lot of the "aliasing" that arises when WikiWords
and urls just "happen" to occur in another markup sequence.  And I
don't think much would break as a result.

Any thoughts from the various markup authors...?

Pm



More information about the pmwiki-users mailing list