PITS /
00117: PmWiki generating null llinks ('/')
Summary: PmWiki generating null llinks ('/')
Created: 2004-10-27 01:45
Status: Closed - fixed in 2.0.devel19
Category: Bug
From: jr
Assigned:
Priority:
Version: 2.0 dev 17
OS: all
Description: At least, I think it's a bug. Description and example follow.
$PageNameChars = '-_~[:alnum:]'; $NamePattern = '[[:upper:]\\d][\\w]*(?:[-~]\\w+)*'; Markup('[[_','<links','/\[\[_([^\|\]]+)\]\]/e', "'[[' . preg_replace('/~.*$/','',FmtPageName('\$Name',\$pagename)) . PSS('~$1 | ~$1') . ']]'");
If I write [[_Child]]
this should produce a link to PITS.00117~Child. Instead it produces a link to '/' -- a null page. It is definitely generating [[PITS.00117~Child | ~Child]], but PmWiki doesn't like it. However, the following code
$PageNameChars = '-_~[:alnum:]'; $NamePattern = '[[:upper:]\\d][\\w]*(?:[-~]\\w+)*'; Markup('[[_','<links','/\[\[(_[^\|\]]+)\]\]/e', "'[[' . preg_replace('/_.*$/','',FmtPageName('\$Name',\$pagename)) . PSS('$1 | $1') . ']]'");
correctly produces a link to the page PITS.00117_Child. Either it's a bug or something so obvious I can't see it. I get the same problem when using other characters, like a \* instead of _.