Site: isometric geometry; comment checks scan JS, TS and CSS by tokens

This commit is contained in:
ZacharyZhang-NY committed 2026-10-08 23:26:32 -04:00
1 parent 570bb176e8
commit b991d59b21
12 files changed
+292 -41

No files matched your search

+10
View File
@@ -30,6 +30,16 @@ for ext in ts css; do
check || fail "a short .$ext comment failed"
rm "$work/site/src/a.$ext"
done
printf 'const glob = "/*.css";\n' >"$work/site/src/a.ts"
check || fail "a /* inside a .ts string failed"
printf 'const a = 1; // One two three four five six seven eight nine ten eleven.\n' >"$work/site/src/a.ts"
! check || fail "an eleven-word trailing .ts comment passed"
rm "$work/site/src/a.ts"
printf 'a::after { content: "/*"; }\n' >"$work/site/src/a.css"
check || fail "a /* inside a .css string failed"
printf 'a { color: red; } /* One two three four five six seven eight nine ten eleven. */\n' >"$work/site/src/a.css"
! check || fail "an eleven-word trailing .css comment passed"
rm "$work/site/src/a.css"
printf '// One two three four five six seven eight nine ten eleven.\n' >"$work/tests/scripts/a.swift"
! check || fail "an eleven-word Swift comment passed"
echo "ok: comment rules"