[pmwiki-users] `WikiWord disables WikiWord ?

John Rankin john.rankin at affinity.co.nz
Thu Jul 28 16:33:17 CDT 2005


On Wednesday, 27 July 2005 7:34 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Wed, Jul 27, 2005 at 02:03:08PM +1200, John Rankin wrote:
>> ## prevent wikiwords with only one lower case letter
>> SDV($AbbreviationPattern,
>>   "[[:upper:]]+(?:[[:upper:]][[:lower:]]|[[:lower:]][[:upper:]])[[:upper:]]*");
>> 
>>
>Markup("abbr",'>[[',"/`?\\b($AbbreviationPattern)\\b/e","Keep('$1')");
>
>I hadn't looked at the definition of this particular rule until now, and
>I must say it's *very* nicely done.  I may adopt it for the distribution, 
>or at least put it in the sample-config.php file.  

Doing this will break a number of local customisations, which rely on
knowing whether or not to treal abbreviations as wikiwords.

For example, the teaser, includeg and rename recipes need to know
whether to add a group qualifier to an unqualified wikiword when 
bringing text from another group. They currently check whether
abbreviations are or ar not wikiwords and act accordingly.

So if this becomes an optional part of the distribution, 
it would be nice if there were an easy way to determine 
whether or not the option is enabled.
>
>I think that second argument to Markup really needs to be '<`wikiword' rather 
>than '>[['.  Otherwise there's the possibility that this rule will
>fire before urllinks are processed, and thereby inadvertently destroy
>url-based links such as:
>
>    http://www.example.com/PaGES
>    Attach:PICs.jpg
>

Will do.    

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list