Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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#<script\b[^>]*>.*?</script>##gis; s#<style\b[^>]*>.*?</style>##gis' {} +
-exec perl -0pi -e 's#<script\b[^>]*>.*?</script>##gis; s#<style\b[^>]*>.*?</style>##gis; s#<([a-z]+)\b[^>]*\bdata-slot="avatar-fallback"[^>]*>.*?</\1>##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 "*" \
Expand Down