[Pmwiki-users] Named references [[#name]]

Patrick R. Michaud pmichaud at sci.tamucc.edu
Mon May 5 18:15:58 CDT 2003


On Tue, May 06, 2003 at 11:03:57AM +1200, John Rankin wrote:
> My browser reports an HTML error if I write:
> 
>   [[#name]] ... text ... WikiWord
> 
> and says that nested <a> references are not allowed.
> 
> If I change the inline replacement for [[#name]] to include </a> the message goes away.

Seems reasonable, and it appears that HTML 4.0 does require the closing
</a> tag for valid HTML.

Also, I'm thinking of moving the markup out of $InlineReplacements and
into $LinkPatterns so that [[#WikiWord]] will work properly.  Probably
something along the lines of:

   $LinkPatterns[790]['\\[\\[#([A-Za-z][-.:\\w]*?)\\]\\]'] =
      '<a name="\$1"></a>';


This would occur just before WikiWord substitutions take place
(and therefore gain precedence).

Pm




More information about the pmwiki-users mailing list