[pmwiki-users] `WikiWord disables WikiWord ?
DaveG
pmwiki at solidgone.com
Thu Jul 28 21:46:03 CDT 2005
>>The other approach is to adjust the $WikiWordPattern to require at
>>least two lowercase letters, but that has its own set of issues.
>>At any rate, it won't happen anytime soon.
>>
>>This is a reasonable interim solution. Could someone help me
>>with an addition to include wikiwords with numbers -- thus MR2
>>would be treated as an acronym and ignored as a wikiword?
>>
>>
>
>The markup extensions recipe tested the following pattern, which
>is currently disabled:
>
>## require 2 lower and upper case characters for a WikiWord
>$WikiWordPattern = '[[:upper:]][[:alnum:]]*(?:[[:upper:]][[:lower:]0-9][[:lower:]0-9]|[[:lower:]0-9][[:lower:]0-9][[:upper:]]|[[:lower:]0-9][[:upper:]]+[[:lower:]0-9])[[:alnum:]]*';
>
>Yuck!!
>
>A modified abbreviation pattern is:
>SDV($AbbreviationPattern,
> "[[:upper:]]+(?:[[:upper:]][[:lower:]0-9]|[[:lower:]0-9][[:upper:]])[[:upper:]]*");
>Markup("abbr",'<`wikiword',"/`?\\b($AbbreviationPattern)\\b/e","Keep('$1')");
>
>Try that, which incorporates Patrick's suggested sequence change.
>
From a quick test this works great. As an added bonus it avoids the
spacing problem for number-included non-wiki-words (i.e., MR2 with
WikiWordCount['MR2']=0). (ref
http://www.solidgone.com/pmwiki/index.php?n=Main.WikiSandbox -- I have
no WikiWordCounts defined, only using the modified abbreviation pattern
above).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20050728/a3db1fee/attachment.html
More information about the pmwiki-users
mailing list