Skip to content

Commit 3ae76b1

Browse files
authored
Only include ref links to index in multi-page html (#1388)
This allows us to drop some manual links removal in mathjax2katex.py.
1 parent 932fbf8 commit 3ae76b1

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

document/core/index.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ WebAssembly Specification
2929
appendix/index-instructions
3030
appendix/index-rules
3131

32-
.. only:: html
32+
..
33+
Only include these links when using (multi-page) html builder.
34+
(The singlepage html builder is called builder_singlehtml.)
35+
36+
.. only:: builder_html
3337

3438
* :ref:`index-type`
3539
* :ref:`index-instr`

document/core/util/mathjax2katex.py

-13
Original file line numberDiff line numberDiff line change
@@ -160,19 +160,6 @@ def ExtractMath(match):
160160
data = data.replace(
161161
'<li class="nav-item nav-item-0"><a href="index.html#document-index">'
162162
'WebAssembly 1.0</a> »', '')
163-
# Drop Index links.
164-
data = data.replace(
165-
'<li><a class="reference internal" href="index.html#index-type">'
166-
'<span class="std std-ref">Index of Types</span></a>', '')
167-
data = data.replace(
168-
'<li><a class="reference internal" href="index.html#index-instr">'
169-
'<span class="std std-ref">Index of Instructions</span></a>', '')
170-
data = data.replace(
171-
'<li><a class="reference internal" href="index.html#index-rules">'
172-
'<span class="std std-ref">Index of Semantic Rules</span></a>', '')
173-
data = data.replace(
174-
'<li><a class="reference internal" href="genindex.html">'
175-
'<span class="std std-ref">Index</span></a>', '')
176163
# Drop sphinx css.
177164
data = data.replace(
178165
'<link href="_static/classic.css" rel="stylesheet" type="text/css">', '')

0 commit comments

Comments
 (0)