(app, env, node, contnode)
| 125 | |
| 126 | |
| 127 | def maybe_resolve_abbreviations(app, env, node, contnode): |
| 128 | domainname = node.get('refdomain') |
| 129 | target = node['reftarget'] |
| 130 | type = node['reftype'] |
| 131 | if target.startswith('@'): |
| 132 | newtarget, src_dict = resolve(target, type) |
| 133 | node['reftarget'] = newtarget |
| 134 | # shorten text if '~' is not enabled. |
| 135 | if len(contnode) and isinstance(contnode[0], nodes.Text): |
| 136 | contnode[0] = modify_textnode(target, newtarget, node, |
| 137 | src_dict, type) |
| 138 | if domainname: |
| 139 | try: |
| 140 | domain = env.domains[node.get('refdomain')] |
| 141 | except KeyError: |
| 142 | raise NoUri |
| 143 | try: |
| 144 | return domain.resolve_xref(env, node['refdoc'], app.builder, |
| 145 | type, newtarget, |
| 146 | node, contnode) |
| 147 | except KeyError: |
| 148 | raise NoUri |
| 149 | |
| 150 | |
| 151 | def setup(app): |
nothing calls this directly
no test coverage detected