mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Code cleanup: remove redundant check; move uri formatting into branch.
This commit is contained in:
parent
948991ed28
commit
1eb07f1e96
@ -295,13 +295,12 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
||||
uri = node.get('refuri', '')
|
||||
if (uri.startswith('http:') or uri.startswith('https:') or
|
||||
uri.startswith('ftp:')) and uri not in node.astext():
|
||||
uri = _link_target_template % {'uri': uri}
|
||||
if uri:
|
||||
idx = node.parent.index(node) + 1
|
||||
if show_urls == 'inline':
|
||||
link = nodes.inline(uri, uri)
|
||||
link['classes'].append(_css_link_target_class)
|
||||
node.parent.insert(idx, link)
|
||||
idx = node.parent.index(node) + 1
|
||||
if show_urls == 'inline':
|
||||
uri = _link_target_template % {'uri': uri}
|
||||
link = nodes.inline(uri, uri)
|
||||
link['classes'].append(_css_link_target_class)
|
||||
node.parent.insert(idx, link)
|
||||
|
||||
def write_doc(self, docname, doctree):
|
||||
"""Write one document file.
|
||||
|
Loading…
Reference in New Issue
Block a user