From 297249f872c624965068a9dd8bffe737bbffa42e Mon Sep 17 00:00:00 2001 From: George Stagg Date: Mon, 17 Jun 2024 09:24:52 +0100 Subject: [PATCH] Fix R documentation generation --- src/docs/api/r.qmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/api/r.qmd b/src/docs/api/r.qmd index 328164eb..7697f4cd 100644 --- a/src/docs/api/r.qmd +++ b/src/docs/api/r.qmd @@ -11,10 +11,10 @@ The webR R API is provided via a pre-installed `webr` support package. library(rvest) files <- list.files(path="../../../packages/webr/man/", pattern="*.Rd", full.names=TRUE) for (f in files) { - capture.output(tools::Rd2HTML(f)) |> + capture.output(tools::Rd2HTML(f, standalone = FALSE)) |> paste(collapse = '\n') |> minimal_html() |> - html_elements(xpath="//*[contains(@class, 'container')]/*[position() >= 2]") |> + html_elements(xpath="//body") |> paste(collapse='') |> writeLines() }