Thanks for this.<div><br></div><div>It is rather tricky to parse.</div><div>The only was to correctly parse #NAME..#NAME is to find the second # and the preceding double dots.</div><div>A NAME can valid syntactically include a double dot, eg #name1..2..#name3</div>
<div><br></div><div>Simon<br><br><div class="gmail_quote">On 9 April 2012 06:11, Patrick R. Michaud <span dir="ltr"><<a href="mailto:pmichaud@pobox.com">pmichaud@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, Apr 08, 2012 at 11:14:54PM +1200, Simon wrote:<br>
> Thanks for the very prompt reply.<br>
> I believe that this is a bug then, include does not use the same definition<br>
> of an anchor token as does the code that parses links and anchors.<br>
<br>
</div>The problem appears to be the definition of $npat on line 1266 of pwmiki.php:<br>
<br>
    $npat = '[[:alpha:]][-\\w*]*';<br>
<br>
Note that simply adding a dot to the [-\\w]* part of the expression<br>
won't work, as a pair of dots are used to indicate ranges.<br>
It probably needs to be something that can recognize a single dot<br>
in the identifier pattern (i.e., a dot followed by something<br>
other than another dot).<br>
<br>
Also, I suspect the '*' immediately the \\w in the original is a typo.<br>
And there's an extraneous definition of $npat on line 1311 in the<br>
IncludeText() function, probably left over from a previous factoring<br>
of text includes.<br>
<span class="HOEnZb"><font color="#888888"><br>
Pm<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>____<br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a><br>
</div>