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" %
(int(target))
)
else:
return label
/Henrik
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en.