[pmwiki-users] Custom link markup (for linking into Bugzilla)

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Sat Apr 14 07:47:00 CDT 2007


At the development pages for wiki.lyx.org, I wanted a tighter integration 
between the wiki and the Bugzilla database. The first thing I did was to
create an intermap prefix

 	LyXBug:	   http://bugzilla.lyx.org/show_bug.cgi?id=$1

so 'LyXBug:3204' will link into bugzilla. However, Bugzilla 
automatically converts something like

 	bug 3204

into a link so I wanted to repeat that behaviour for the development 
group and used the following custom markup code:

     Markup('buglink', '<links',
            '/(bug\\s+)([0-9]+)/ei',
            '"[[LyXBug:".PSS("$2")."|".PSS("$1").PSS("$2")."]]"');

I admit it was a quick fix, and now I've discovered it doesn't behave as 
well as it should. For instance, I'm now not able to write

 	[[LyXBug:3204 | Bug 3204 - a difficult bug]]

because the 'Bug 3204' will be interpreted. Nor can I use 'Bug 3203' in a 
title and get table of contents working properly. And finally, I'm not 
able to write e.g. [[Bug 3204 | a difficult bug]].

So my question is the following:  How should I design the markup so that 
something like 'bug 3204' behaves properly?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr


More information about the pmwiki-users mailing list