Skip to content

Commit

Permalink
Re-instate the footnote-reference class
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jul 14, 2023
1 parent 0858c3b commit 571becb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sphinx/writers/html5.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,3 +887,12 @@ def depart_math_block(self, node: Element, math_env: str = '') -> None:
_, depart = self.builder.app.registry.html_block_math_renderers[name]
if depart: # type: ignore[truthy-function]
depart(self, node)

# See Docutils r9413
# Re-instate the footnote-reference class
def visit_footnote_reference(self, node):
href = '#' + node['refid']
classes = ['footnote-reference', self.settings.footnote_references]
self.body.append(self.starttag(node, 'a', suffix='', classes=classes,
role='doc-noteref', href=href))
self.body.append('<span class="fn-bracket">[</span>')

0 comments on commit 571becb

Please sign in to comment.