MCPcopy Create free account
hub / github.com/ipython/traitlets / ghuser_role

Function ghuser_role

docs/sphinxext/github.py:103–123  ·  view source on GitHub ↗

Link to a GitHub user. Returns 2 part tuple containing list of nodes to insert into the document and a list of system messages. Both are allowed to be empty. :param name: The role name used in the document. :param rawtext: The entire markup snippet, with role. :param text:

(name, rawtext, text, lineno, inliner, options=None, content=None)

Source from the content-addressed store, hash-verified

101
102
103def ghuser_role(name, rawtext, text, lineno, inliner, options=None, content=None):
104 """Link to a GitHub user.
105
106 Returns 2 part tuple containing list of nodes to insert into the
107 document and a list of system messages. Both are allowed to be
108 empty.
109
110 :param name: The role name used in the document.
111 :param rawtext: The entire markup snippet, with role.
112 :param text: The text marked with the role.
113 :param lineno: The line number where rawtext appears in the input.
114 :param inliner: The inliner instance that called us.
115 :param options: Directive options for customization.
116 :param content: The directive content for customization.
117 """
118 options = options or {}
119 content = content or []
120 # info('user link %r' % text)
121 ref = "https://www.github.com/" + text
122 node = nodes.reference(rawtext, text, refuri=ref, **options)
123 return [node], []
124
125
126def ghcommit_role(name, rawtext, text, lineno, inliner, options=None, content=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…