Skip to content

Commit d321101

Browse files
committed
Fix footnote fixing
1 parent 90f36c8 commit d321101

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/* Sphinx JavaScript utilities for all documentation.
2-
* Adapted from https://github.com/sphinx-doc/sphinx/blob/master/sphinx/themes/basic/static/doctools.js
3-
* Removed libraries (jQuery/underscores) & stripped down
4-
*/
1+
/* JavaScript utilities for all documentation. */
52

63
// Footnote fixer
7-
document.querySelectorAll("span.brackets").forEach(el => {
8-
if (!el.children.length) el.innerText = "[" + el.innerText + "]"
9-
})
4+
document.querySelectorAll("span.brackets").forEach(el => el.innerHTML = "[" + el.innerHTML + "]")
5+
document.querySelectorAll("a.brackets").forEach(el => el.innerHTML = "[" + el.innerHTML + "]")

pep_sphinx_extensions/theme/static/style.css

-10
Original file line numberDiff line numberDiff line change
@@ -292,16 +292,6 @@ dl.footnote > dd {
292292
border-left: 2px solid #fff;
293293
}
294294

295-
/* Link formatting */
296-
a.brackets:before,
297-
span.brackets > a:before{
298-
content: "[";
299-
}
300-
a.brackets:after,
301-
span.brackets > a:after {
302-
content: "]";
303-
}
304-
305295
/* Sidebar formatting */
306296
aside.left-sidebar {
307297
overflow-y: scroll;

pep_sphinx_extensions/theme/templates/page.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<link rel="stylesheet" href="{{ pathto('_static/style.css', resource=True) }}" type="text/css" />
1010
<link rel="stylesheet" href="{{ pathto('_static/mq.css', resource=True) }}" type="text/css" />
1111
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', resource=True) }}" type="text/css" />
12-
<script src="{{ pathto('_static/doctools.js', resource=True) }}"></script>
1312
{%- if favicon %}<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, resource=True)|e }}"/>{%- endif %}
1413
</head>
1514
<body class="python pages pep-page">
@@ -41,5 +40,7 @@
4140
<div style="height: 553.5px; background-color: #e6e8ea; border-top: 1px solid #d8dbde;"></div>
4241
<div style="height: 103.05px; background-color: #2b5b84;"></div>
4342
</footer>
43+
44+
<script src="{{ pathto('_static/doctools.js', resource=True) }}"></script>
4445
</body>
4546
</html>

0 commit comments

Comments
 (0)