Skip to content

Commit 0ee54c4

Browse files
committed
Disable block-level Markdown in Bikeshed
Skipping this gives a small performance improvement, and avoids having to escape what looks like numbered lists. Depends on speced/bikeshed#3186.
1 parent 3dba6c4 commit 0ee54c4

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

build.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ set -o pipefail
77
cd "$(dirname "$0")"
88
DIR=$(pwd)
99

10+
# The latest required version of Bikeshed. Update this if the build depends on
11+
# new features or bugfixes in Bikeshed.
12+
BIKESHED_LATEST="5.4.0"
13+
1014
# The latest required version of Wattsi. Update this if you change how ./build.sh invokes Wattsi;
1115
# it will cause a warning if Wattsi's self-reported version is lower. Note that there's no need to
1216
# update this on every revision of Wattsi; only do so when a warning is justified.
@@ -86,7 +90,9 @@ function main {
8690
exit 0
8791
fi
8892

89-
if [[ $USE_BIKESHED != "true" ]]; then
93+
if [[ $USE_BIKESHED == "true" ]]; then
94+
checkBikeshed
95+
else
9096
checkWattsi
9197
ensureHighlighterInstalled
9298

@@ -747,6 +753,24 @@ Disallow: /review-drafts/" > "$HTML_OUTPUT/robots.txt"
747753
fi
748754
}
749755

756+
# Checks if Bikeshed is available and up to date
757+
# - Arguments: none
758+
# - Output:
759+
# - Will echo any errors and exit the script with error code 1 if the required
760+
# version is not available.
761+
function checkBikeshed {
762+
if hash bikeshed 2>/dev/null; then
763+
BIKESHED_INSTALLED=$(bikeshed --version)
764+
if ! printf "%s\n%s" "$BIKESHED_LATEST" "$BIKESHED_INSTALLED" | sort -V -C; then
765+
echo "Error: bikeshed version $BIKESHED_LATEST or newer is required."
766+
exit 1
767+
fi
768+
else
769+
echo "Error: bikeshed is required."
770+
exit 1
771+
fi
772+
}
773+
750774
# Checks if Wattsi is available and up to date
751775
# - Arguments: none
752776
# - Output:

wattsi2bikeshed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Text Macro: TWITTER htmlstandard
1010
Text Macro: LATESTRD 2025-01
1111
Abstract: HTML is Bikeshed.
1212
Indent: 1
13-
Markup Shorthands: css off
13+
Markup Shorthands: css off, markdown-block off
1414
Complain About: accidental-2119 off, missing-example-ids off
1515
Include MDN Panels: false
1616
</pre>`;

0 commit comments

Comments
 (0)