From 10019366ba5f8bc156450b7e246e1741389f35c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Skytte=20Randl=C3=B8v?= Date: Tue, 13 Feb 2024 09:23:49 +0100 Subject: [PATCH] feat(pkgdown): Fix references (S3 class w. spaces) --- .github/workflows/pkgdown.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 99657578..fecb1a68 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -59,6 +59,19 @@ jobs: run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} + - name: Fix malformed formatting + run: | + # It seems pkgdown does not properly format the reference/index.html file when S3 methods for classes + # with spaces are used (such as "Microsoft SQL Server"). + + # Modify the index.html file to fix the formatting + # Using sed, we add missing parentheses to the function names + sed -i 's/\1<\/a><\/code>/\1()<\/a><\/code>/g' docs/reference/index.html + + + # We also remove the surplus entry for the classes with spaces + sed -i 's/\w\+\.[a-zA-Z_ ]\+<\/a><\/code>//g' docs/reference/index.html + - name: Upload artifact uses: actions/upload-artifact@v4 with: