From 59ec1b8f611cf5e6f10db55586c423c9e0d5874f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Skytte=20Randl=C3=B8v?= Date: Tue, 29 Oct 2024 14:01:08 +0100 Subject: [PATCH] ix(pkgdown): Update R6 autolinking for active bindings --- .github/workflows/pkgdown.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 935e338..787672f 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -82,14 +82,26 @@ jobs: # regex: \?(\w+)<\/a> find docs -name *.html -exec sed -ri 's/()\?(.+<\/a>)/\1\2/g' {} + + # Fixing "?R6class$function()" # pkgdown does not generate links for this type of reference, so we need to create the link fully manually # The code has the following format when generated by pkgdown + # ?DiseasystoreBase$get_feature() + # We need to manually create the link to the function + # regex: \?(\w+)\$(\w+)\(\)<\/code> + # Target: $get_feature() + find docs -name *.html -exec sed -ri 's/\?(\w+)\$(\w+)\(\)<\/code>/\$\2\(\)<\/a><\/code>/g' {} + + + + # Fixing "?R6class$active_binding" + # pkgdown does not generate links for this type of reference, so we need to create the link fully manually + # The code has the following format when generated by pkgdown # ?DiseasystoreBase$available_observables # We need to manually create the link to the function - # regex: \?(\w+)\$()(\w+)[\(\)]+<\/code> - # Target: get_feature() - find docs -name *.html -exec sed -ri 's/\?(\w+)\$(\w+(:?\(\))?)<\/code>/\$\2<\/a><\/code>/g' {} + + # regex: \?(\w+)\$(\w+)<\/code> + # Target: $available_observables + find docs -name *.html -exec sed -ri 's/\?(\w+)\$(\w+)<\/code>/\$\2<\/a><\/code>/g' {} + + - name: Upload artifact uses: actions/upload-artifact@v4