def format_references(app, doctree, docname): for node in doctree.traverse(nodes.reference): text = node[0].astext() node.pop(0) node += miniparse(text)
def tt(role, rawtext, text, lineno, inliner, options={}, content={}): node = nodes.inline() node['classes'].append('tt') node += miniparse(rawtext[5:-1]) return [node],[]
def subscript(role, rawtext, text, lineno, inliner, options={}, content={}): sub = nodes.subscript() sub += miniparse(text) return [sub],[]
def command(role, rawtext, text, lineno, inliner, options={}, content={}): node = nodes.inline() node['classes'].append('cmd') node += miniparse(text) return [node],[]