[Pmwiki-users] Setting $WikiWordCount['COM1'] doesn't work inside tables
Christian Ridderström
chr
Tue Jul 13 08:25:15 CDT 2004
Hi
Normally pmwiki interprets strings such as "COM1" as a wiki word. The
recommended solution was to add this to local/config.php:
$WikiWordCount['COM1'] = 0;
Unfortunately my text contains lots of text like this:
Use COM1/COM2 to ...
where the result is "COM2?" (the leading 'COM1' is interpreted as a
group). I've illustrated the problem here:
http://www.pmichaud.com/wiki/Test/WordCount
Help?
/Christian
PS. Actually it's not 'COM1' etc that I have the problem with, but a lot
of names of signals from a microprocessor. The text contains lots of
things like 'RA0/AN0'. And it's a matter of a lot of different signals
like this:
$WikiDisable = array('COM1', 'COM2', 'COM3', 'COM4', 'COM5',
'RA0', 'RA1', 'RA2', 'RA3', 'RA4', 'RA5', 'RA6', 'RA7',
'RB0', 'RB1', 'RB2', 'RB3', 'RB4', 'RB5', 'RB6', 'RB7',
'RC0', 'RC1', 'RC2', 'RC3', 'RC4', 'RC5', 'RC6', 'RC7',
'RD0', 'RD1', 'RD2', 'RD3', 'RD4', 'RD5', 'RD6', 'RD7',
[snip]
);
foreach($WikiDisable as $v) { $WikiWordCount[$v] = 0; }
So I'd really like some other solution. For instance the possibility of
specifying an array with regular expressions that is used to reject a
string that pmwiki thinks is a link. In this case, I could just specify:
$WikiWordsReject = ['COM[0-9]', 'R[A-F][0-9]'];
and that'd be it.
--
Christian Ridderstr?m http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list