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={}, content=[])
| 93 | return [node], [] |
| 94 | |
| 95 | def ghuser_role(name, rawtext, text, lineno, inliner, options={}, content=[]): |
| 96 | """Link to a GitHub user. |
| 97 | |
| 98 | Returns 2 part tuple containing list of nodes to insert into the |
| 99 | document and a list of system messages. Both are allowed to be |
| 100 | empty. |
| 101 | |
| 102 | :param name: The role name used in the document. |
| 103 | :param rawtext: The entire markup snippet, with role. |
| 104 | :param text: The text marked with the role. |
| 105 | :param lineno: The line number where rawtext appears in the input. |
| 106 | :param inliner: The inliner instance that called us. |
| 107 | :param options: Directive options for customization. |
| 108 | :param content: The directive content for customization. |
| 109 | """ |
| 110 | app = inliner.document.settings.env.app |
| 111 | #info('user link %r' % text) |
| 112 | ref = 'https://www.github.com/' + text |
| 113 | node = nodes.reference(rawtext, text, refuri=ref, **options) |
| 114 | return [node], [] |
| 115 | |
| 116 | def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]): |
| 117 | """Link to a GitHub commit. |
nothing calls this directly
no outgoing calls
no test coverage detected