[Pmwiki-users] How To Change Valid Wiki Titles

Christian Ridderström chr
Sat Jan 31 07:44:24 CST 2004


On Sat, 31 Jan 2004, Steven Leite wrote:

> 
> > > Q:  I want to be able to (allow) "&" character in my Wiki Titles.  How
> do I
> > > do it?  I think I need to modify one or more of the snippets below:
> > >
> > > $GroupNamePattern="[A-Z][A-Za-z0-9]+";
> > >
> > >
> $WikiWordPattern="[A-Z][A-Za-z0-9]*(?:[A-Z][a-z0-9]|[a-z0-9][A-Z])[A-Za-z0-9
> > > ]*";
> > >
> > >
> $FreeLinkPattern="{{(?>([A-Za-z][A-Za-z0-9]*(?:(?:[\\s_]*|-)[A-Za-z0-9]+)*)(
> > > ?:\\|((?:(?:[\\s_]*|-)[A-Za-z0-9])*))?)}}((?:-?[A-Za-z0-9]+)*)";
> > >
> > > $FragmentPattern="#[A-Za-z][-.:\\w]*";
> > >
> > > $PageTitlePattern="[A-Z][A-Za-z0-9]*(?:-[A-Za-z0-9]+)*";
> > >
> > > A: ?
> >
> > I think '&' is one of the more difficult characters to use... (it's used
> > to separate arguments in URIs). Could you explain a bit more:
> > * Why do you want this specific character?
> > * Some examples of how you'd use it?
> > * Is it primarily in the title that you want it to appear?
> >
> I want it primarily for Page Titles.  I'm creating {{Free Links}} and when I
> list (for example, a name of a company or organization) I want to be able to
> write {{A & B Janitorial Services}} or {{Wozney & Associates}} instead of
> {{A And B Janitorial}} and {{Wozney And Associates}}.
> 
> What do you think? Possible?

This is much easier I'd say. It should be enough to define a special 
sequence that'll be rendered as '&' in the title. E.g. you could use

	{{A-AND-B Janitorial Services}}

and make it appear as 'A & B Janitorial Services'. In this case, it 
would involve doing some search&replace of '-AND-' with ' & '. I don't 
know how to do it exactly though. But with the help of the list we could 
probably figure it out.

/Christian

-- 
http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list