Skip to content

Commit 820fe52

Browse files
committed
chore: align asset-check comments with the DOM-tolerant parser
The GetStyle comment framed the DOM walk around attribute order, attribute set, and quoting, the same properties the old regex parser depended on, without stating that the new parser ignores all of them. check-built-assets.sh described its self-check as failing when asset tags change shape, but the fixtures test a missing script or stylesheet tag, and the parser accepts any shape as long as the tag is present. Comments now state the actual constraint: tag shape does not affect parsing, and the guarding check fails when a build is present but a required script or stylesheet tag is missing from it. (cherry picked from commit 3bc12e8, script/check-built-assets.sh only)
1 parent b11b98a commit 820fe52

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎script/check-built-assets.sh‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
# why that is not implied by a successful build.
2222
#
2323
# --skip-build reuse an existing ui/build, do not rebuild
24-
# --self-check additionally rewrite ui/build/index.html with asset tag
25-
# shapes the server cannot parse and confirm the check fails
26-
# on them. Restores the real build output afterwards.
24+
# --self-check additionally rewrite ui/build/index.html so a script
25+
# or stylesheet tag is missing, and confirm the check
26+
# fails on the missing asset. Restores the real build
27+
# output afterwards.
2728

2829
set -euo pipefail
2930

@@ -69,9 +70,9 @@ if [ "$self_check" -eq 0 ]; then
6970
exit 0
7071
fi
7172

72-
# Confirm the check actually fails when the asset tags change shape. Without
73-
# this, a check that silently stopped asserting anything would look identical
74-
# to a passing one.
73+
# Confirm the check actually fails when a required asset is missing from
74+
# the build output. Without this, a check that silently stopped asserting
75+
# anything would look identical to a passing one.
7576
backup="$(mktemp)"
7677
cp "$INDEX_HTML" "$backup"
7778
trap 'cp "$backup" "$INDEX_HTML"; rm -f "$backup"' EXIT

0 commit comments

Comments
 (0)