reStructured text interpreted text roles for TracLinks.
- Imports:
- docutils, docutils.core, docutils.parsers.rst, docutils.utils, os, os.path, re, sys, unittest
- Methods:
- arguments(name, args, options, content, lineno, content_offset, block_text, state, state_machine):
- getTracRef():
- setTracRef(tracRef): I assign a global tracRef function. The function
must accept *path and **query arguments and
return a trac reference from the arguments.
- testSuite(): Create a unit test suite.
- tracRef(base):
- tracRefError(rawtext, inliner): Return a reStructured text inline error if
the trac environment was not initialized.
- tracRoleError(errText, inliner): Return a reStructured text inline error if
the trac environment was not initialized.
- trac_role(role, rawtext, text, lineno, inliner, options={ }, content=[]): I implement roles for trac wiki syntax.
- Attributes:
- _tracRef = None
- arguments.arguments = (0, 1, 1)
- arguments.content = 1
- arguments.options = { 'class' : directives.class_option }
Back to roles
- Arguments:
- tracRef
I assign a global tracRef function. The function
must accept *path and **query arguments and
return a trac reference from the arguments.
>>> setTracRef(tracRef("http:/path/to/my/trac"))
>>> print getTracRef()("wiki/MyWikiPage", arg1=1)
http:/path/to/my/trac/wiki/MyWikiPage?arg1=1
- Globals:
- _tracRef
Back to roles
- Arguments:
Create a unit test suite.
- Imports:
- doctest, roles