diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt index 35a87d3..6bb1080 100644 --- a/.github/actions/spelling/patterns.txt +++ b/.github/actions/spelling/patterns.txt @@ -163,6 +163,9 @@ x-served-by: \S+ # Candidate pattern Line matches candidate pattern `.*` \(candidate-pattern\) +# jekyll bug +".*?code.*?code.*?" + # Questionably acceptable forms of `in to` # Personally, I prefer `log into`, but people object # https://www.tprteaching.com/log-into-log-in-to-login/ diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index 5eaef46..0a18479 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -27,6 +27,12 @@ jobs: with: source: ./ destination: ./_site + - name: Fix code anchors (# `something` or another) or (# thing or `thing`) which are unfortunately encoded as (id="codesomethingcode-or-another") or (id="thing-or-codethingcode") + working-directory: ./_site + shell: bash + run: | + : 'Fix anchors that poorly encoded "`foo`" as "codefoocode"' + sudo perl -pi -e 'while (s/(id="[^"]*)code([^"]+)code/$1$2/g) {};' *.html - name: Upload artifact uses: actions/upload-pages-artifact@v3