Commits

Anonymous committed 3036821

Code cleanup: remove redundant check; move uri formatting into branch.

  • Participants
  • Parent commits 4bacb57

Comments (0)

Files changed (1)

File sphinx/builders/epub.py

             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.