From 27799cd9f08e18e5f83bc11822b910398fe466c9 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Mon, 6 May 2019 16:04:39 -0700 Subject: [PATCH] Fix bikeshed build (#1014) 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 `` 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`. --- document/core/index.bs | 2 +- document/core/util/mathjax2katex.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/document/core/index.bs b/document/core/index.bs index 2cbd5058ba..06357f6a4f 100644 --- a/document/core/index.bs +++ b/document/core/index.bs @@ -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 diff --git a/document/core/util/mathjax2katex.py b/document/core/util/mathjax2katex.py index 0b38ffdda0..b42fe3e1a7 100755 --- a/document/core/util/mathjax2katex.py +++ b/document/core/util/mathjax2katex.py @@ -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()