diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 99657578..afaa59a9 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -59,6 +59,18 @@ 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\+\.\w\+ [\w ]\+\)<\/a><\/code>//g' docs/reference/index.html + - name: Upload artifact uses: actions/upload-artifact@v4 with: