mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[html] propagate rel attribute from reference nodes (#12489)
See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel, this allows third-party extensions to set this attribute on the node and have it propagate to the output HTML
This commit is contained in:
@@ -325,6 +325,8 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
|
||||
atts['title'] = node['reftitle']
|
||||
if 'target' in node:
|
||||
atts['target'] = node['target']
|
||||
if 'rel' in node:
|
||||
atts['rel'] = node['rel']
|
||||
self.body.append(self.starttag(node, 'a', '', **atts))
|
||||
|
||||
if node.get('secnumber'):
|
||||
|
||||
Reference in New Issue
Block a user