9 Dec 2010 16:50
[Trac-dev] Re: Wiki syntax provider question
osimons <oddsimons <at> gmail.com>
2010-12-09 15:50:35 GMT
2010-12-09 15:50:35 GMT
On Dec 9, 2:39 pm, Henrik <hjoens... <at> gmail.com> wrote:
> Hi,
>
> I have tried to write a new wiki syntax provider to create links to
> our NCR system (IBM Telelogic Synergy). These NCR's looks like this,
> cbxpt_se#1234. I have managed to create my own class (see below).
> However, it works at the moment for this syntax, cbxpt_se:1234. So my
> question, is it possible to adapt my wikisyntaxprovider to match #
> instead of :? Or is this reserved for trac ticket links, #1234?
>
> class cbxptWikiSyntax(Component):
>
> implements(IWikiSyntaxProvider)
>
> def get_link_resolvers(self):
> return [ ('cbxpt_se', self._format_link) ]
>
> def get_wiki_syntax(self):
> return []
>
> def _format_link(self, formatter, ns, target, label):
> url = "http://stoweb01.scan.bombardier.com/~ebiconfig/
> infopoint/index.php?
> option=com_rcs_ncr_reports&action=detailedReport&type=cr&name=cbxpt_se
> %C2%A7"
> if target.isdigit():
> return tag.a(
> "cbxpt_se#%d" % int(target),
> href = url + target,
> title = "View cbx_pt #%d on infopoint" %
(Continue reading)
RSS Feed