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)
| 101 | |
| 102 | |
| 103 | def 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 | |
| 126 | def ghcommit_role(name, rawtext, text, lineno, inliner, options=None, content=None): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…