Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions document/core/util/bikeshed_fixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
def Main():
data = open(sys.argv[1]).read()

# Make bikeshed happy
# Apparently it can't handle empty line before DOCTYPE comment
data = data.replace('\n<!DOCTYPE', '<!DOCTYPE')
# Ensure newline before <pre>
data = data.replace('<pre>', '\n<pre>')
# Clean up the input for Bikeshed

# Don't add more than 3 levels to TOC.
data = data.replace('<h5>', '<h5 class="no-toc">')
Expand All @@ -42,18 +38,6 @@ def Main():
'<h3>A.' + str(number) + ' ' + section + '</h3>')
number += 1


# Drop spurious navigation.
data = data.replace(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what this was for?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant with what appears to be an updated version at https://github.com/WebAssembly/spec/blob/main/document/core/util/mathjax2katex.py#L158
If you delete that, it does leave a spurious navigation section; I forget exactly where, but presumably comes from sphinx.

"""
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="nav-item nav-item-0"><a href="#">WebAssembly 1.1</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">WebAssembly 1.1</a></li>
</ul>
</div> """, '')

# Use bikeshed biblio references for unicode and IEEE754
data = data.replace(
"""<a class="reference external" href="https://www.unicode.org/versions/latest/">Unicode</a>""",
Expand Down