[pmwiki-users] Definition Lists

Patrick R. Michaud pmichaud at pobox.com
Sat Feb 18 17:30:48 CST 2006


On Sat, Feb 18, 2006 at 06:22:55PM -0500, DaveG wrote:
> >>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?

1.  Do you want them stripped or converted to underscores?

2.  Do you need PmWiki to also be able to do the same thing on the
    linking end -- i.e., to be able to convert... ?

       [[#my tag | link text]]

Pm


> 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