[Wikitext-l] Wikitext Madness of the Day: Internal Links

Andreas Jonsson andreas.jonsson at kreablo.se
Thu Aug 12 07:39:30 UTC 2010


2010-08-12 07:13, Tomaž Šolc skrev:
> Hi
>
>    
>> (The actual regexp is using (.+?), but using an empty string as link
>> text will still produce a link for some strange reason.)
>>      
> Empty string is actually a special case: such links will use the name of
> the target page minus the namespace prefix for the anchor.
>
>    
I see.  But I can't find the code that handles this case.  The regexp is
'^([{$tc}]+)(?:\\|(.+?))?]]', so if there is a '|' in the link, there 
must be at least
one character following it before the ']]' in order to match.

/Andreas





More information about the Wikitext-l mailing list