From 54de562773fc24386eb71bc30348dbf6826eac88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Fri, 14 Nov 2025 08:38:06 +0100 Subject: [PATCH 1/2] fix: add condition on Pandoc --- DESCRIPTION | 2 +- NEWS.md | 2 ++ R/build-llm.R | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 89770b47b..7f3e4c316 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -76,4 +76,4 @@ Config/usethis/last-upkeep: 2025-09-07 Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.3 -SystemRequirements: pandoc +SystemRequirements: pandoc (>= 2.10.1) diff --git a/NEWS.md b/NEWS.md index a23a28190..5ce1e2d22 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ # pkgdown 2.2.0 +* Make `build_llm_docs()` more robust to the use of old Pandoc(@nanxstats, @galachad, #2952, #2954) + ## Lifecycle changes * `autolink_html()` deprecated in 1.6.0 and `preview_page()` have been removed. diff --git a/R/build-llm.R b/R/build-llm.R index 053cbc0a8..15284e639 100644 --- a/R/build-llm.R +++ b/R/build-llm.R @@ -76,11 +76,17 @@ convert_md <- function(src_path, dst_path, url = NULL) { xml2::write_html(main_html, path, format = FALSE) on.exit(file_delete(path), add = TRUE) + if (rmarkdown::pandoc_available("2.10.1")) { + to <- "gfm+definition_lists-raw_html" + } else { + to <- "gfm-raw_html" + } + rmarkdown::pandoc_convert( input = path, output = dst_path, from = "html", - to = "gfm+definition_lists-raw_html", + to = to, ) } From d33beec427d2af58de3429f454ae4c1072ea57c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Fri, 14 Nov 2025 08:39:16 +0100 Subject: [PATCH 2/2] space --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 5ce1e2d22..e5087ea93 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ # pkgdown 2.2.0 -* Make `build_llm_docs()` more robust to the use of old Pandoc(@nanxstats, @galachad, #2952, #2954) +* Make `build_llm_docs()` more robust to the use of old Pandoc (@nanxstats, @galachad, #2952, #2954) ## Lifecycle changes