diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-06-26 17:31:00 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-06-26 17:31:00 +0300 |
commit | 358611970dcc0a22f0be0ee75153806e736ff427 (patch) | |
tree | 90c8e2969ae1a7df6dc976e05ce05c37578d1b81 /sphinx/ext/viewcode.py | |
parent | bfde3f3714c72fcc3d8b3e1ddb2c8ee3861b763b (diff) |
Revert "viewcode: Fix viewcode raises NoUri error on resolving phase except on HTML builders"
This reverts commit c2ef1ad7e507c86442eae76e1ad7182383e13c8d.
The error was completely resolved by #7683. So this is no longer needed.
Diffstat (limited to 'sphinx/ext/viewcode.py')
-rw-r--r-- | sphinx/ext/viewcode.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sphinx/ext/viewcode.py b/sphinx/ext/viewcode.py index a2eeb7891..dc24a1993 100644 --- a/sphinx/ext/viewcode.py +++ b/sphinx/ext/viewcode.py @@ -131,10 +131,8 @@ def env_merge_info(app: Sphinx, env: BuildEnvironment, docnames: Iterable[str], def missing_reference(app: Sphinx, env: BuildEnvironment, node: Element, contnode: Node ) -> Node: - if app.builder.format != 'html': - return None - elif node['reftype'] == 'viewcode': - # resolve our "viewcode" reference nodes -- they need special treatment + # resolve our "viewcode" reference nodes -- they need special treatment + if node['reftype'] == 'viewcode': return make_refnode(app.builder, node['refdoc'], node['reftarget'], node['refid'], contnode) |