[pmwiki-users] Definition Lists

DaveG pmwiki at solidgone.com
Sat Feb 18 17:22:55 CST 2006


>> are not allowed to begin with digits or contain spaces.
Is there a way to have the regex strip the spaces from the definition name?

  ~ ~ Dave

Patrick R. Michaud wrote:
> On Sun, Feb 12, 2006 at 06:17:53PM -0500, DaveG wrote:
>> Well it works until it hits a term starting with a number, or with more 
>> than one word. Anyone who understands regex help out? Ref 
>> http://mr2wiki.com/Main/WikiSandbox.
>>
>> DaveG wrote:
>>> Here's what I used. Seems to work fine...
>>>     Markup('^terms:', 'fulltext',
>>>        '/^::(.*?):(.*?)$/i', '[[#$1]]<b>$1:</b> $2');
> 
> The problem likely isn't the regex, it's that anchors
> are not allowed to begin with digits or contain spaces.
> See http://www.w3.org/TR/html4/types.html#type-name for why
> this is so.
> 
> Thus:
> 
>     ::3rd:some text
>     ::my tag:some text
> 
> becomes 
> 
>     [[#3rd]]<b>3rd:</b> some text
>     [[#my tag]]<b>my tag:</b> some text
> 
> and PmWiki doesn't recognize [[#3rd]] or [[#my tag]] as a valid anchors.
> 
> Pm
> 
> 
> 
>>> DaveG wrote:
>>>> I'd like to extend the definition list formatting:
>>>>     :term:definition of term
>>>>
>>>> to include anchor links, and additional styling with output like:
>>>>     [[#term]]'''term''': definition of term
>>>>
>>>> what is the name of the markup I should be looking at? Would it be 
>>>> easier to simply define my own markup?
>>>>
>>>>   ~ ~ Dave





More information about the pmwiki-users mailing list