Add a reference to the XRefRole class

This commit is contained in:
Paul 2017-02-07 17:09:39 -06:00
parent a9459aabfa
commit e9bac97518

View file

@ -227,7 +227,9 @@ def inline_entity(inline):
entity_node = nodes.paragraph('', val, format='html')
return entity_node
# The goal is to make references work like the `:any:` role except when an url
# is given. See the XRefRole class in sphinx:
# https://github.com/sphinx-doc/sphinx/blob/master/sphinx/roles.py
def make_refnode(label, target, has_explicit_title):
if target and target.startswith(('http://', 'https://')):
ref_node = nodes.reference()