summaryrefslogtreecommitdiff
path: root/sphinx/util/math.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/math.py')
-rw-r--r--sphinx/util/math.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/util/math.py b/sphinx/util/math.py
index cd06dc249..f5b565020 100644
--- a/sphinx/util/math.py
+++ b/sphinx/util/math.py
@@ -11,7 +11,7 @@ def get_node_equation_number(writer: HTML5Translator, node: nodes.math_block) ->
if writer.builder.config.math_numfig and writer.builder.config.numfig:
figtype = 'displaymath'
if writer.builder.name == 'singlehtml':
- key = "%s/%s" % (writer.docnames[-1], figtype)
+ key = f"{writer.docnames[-1]}/{figtype}"
else:
key = figtype
@@ -54,4 +54,5 @@ def wrap_displaymath(text: str, label: str | None, numbering: bool) -> str:
for part in parts:
equations.append('%s\\\\\n' % part.strip())
- return '%s\n%s%s' % (begin, ''.join(equations), end)
+ concatenated_equations = ''.join(equations)
+ return f'{begin}\n{concatenated_equations}{end}'