From fc2a94b069455ccd6b1ae9a4ae29fce746a237fe Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 12 May 2026 03:56:12 +0800 Subject: [PATCH] Skip avatar-fallback initials in codespell check --- .github/workflows/links.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index d0ef6b52f08..172ff2d4e27 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -128,8 +128,11 @@ jobs: rm -rf "$SPELLCHECK_ROOT" mkdir "$SPELLCHECK_ROOT" cp -R "${{ matrix.website }}" "$SPELLCHECK_ROOT/" + # Also strip avatar-fallback elements: their text is auto-generated + # 2-letter contributor initials (e.g. "BU" for Burhan-Q) that codespell + # would otherwise flag as typos on every page. find "$SPELLCHECK_ROOT/${{ matrix.website }}" -type f -name "*.html" \ - -exec perl -0pi -e 's#]*>.*?##gis; s#]*>.*?##gis' {} + + -exec perl -0pi -e 's#]*>.*?##gis; s#]*>.*?##gis; s#<([a-z]+)\b[^>]*\bdata-slot="avatar-fallback"[^>]*>.*?##gis' {} + CODESPELL_OUTPUT=$(find "$SPELLCHECK_ROOT/${{ matrix.website }}" -type f -name "*.html" -print0 | xargs -0 codespell \ --builtin clear,rare,informal,en-GB_to_en-US \ --uri-ignore-words-list "*" \