Skip to content

Commit

Permalink
Fix bikeshed build (#1014)
Browse files Browse the repository at this point in the history
A recent change caused the generated html to have a sequence that looked
like `{{abkasdfadsf}}`, which bikeshed misinterprets as a WebIDL markup
shorthand. Since we never use that shorthand in the core spec, we can
disable it.

Since bikeshed thought this was a IDL reference, it inserted an
additional `<code>` tag, so the `mathjax2katex.py` script was not able
to extract the math blocks properly. The `FindMatching` function was
raising an `IndexError`, but it was never caught and instead terminated
the worker thread. The main thread would then wait forever for a worker
thread that will never finish. The fix here is to catch all exceptions
and print an error, instead of just catching `KeyboardInterrupt` and
`AssertionError`.
  • Loading branch information
binji authored May 6, 2019
1 parent 6172038 commit 27799cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion document/core/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TR: https://www.w3.org/TR/wasm-core-1/
ED: https://webassembly.github.io/spec/core/bikeshed/
Editor: Andreas Rossberg (Dfinity Stiftung)
Repository: WebAssembly/spec
Markup Shorthands: css no, markdown yes, algorithm no
Markup Shorthands: css no, markdown yes, algorithm no, idl no
Abstract: This document describes version 1.0 of the core WebAssembly standard, a safe, portable, low-level code format designed for efficient execution and compact representation.
Prepare For TR: true
</pre>
Expand Down
2 changes: 1 addition & 1 deletion document/core/util/mathjax2katex.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def Worker():
fixed = ('class="' + cls_before + ' ' + cls_after + '">' +
spans + ReplaceMath(cache, mth) + '<')
done_fixups.append((start, end, fixed))
except KeyboardInterrupt, AssertionError:
except Exception:
sys.stderr.write('!!! Error processing fragment')

q.task_done()
Expand Down

0 comments on commit 27799cd

Please sign in to comment.