[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:
Chris Sewell
2024-07-03 12:53:16 +02:00
committed by GitHub
parent 086a7913d8
commit 8387f4a491

View File

@@ -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'):