From 2dc1e4a3fb9cb8dbb85a20472178a72741fac407 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 20 Sep 2024 11:32:05 -0500 Subject: [PATCH] fix #2361: use the full name of the field `Date/Publication` in package metadata --- DESCRIPTION | 2 +- NEWS.md | 2 ++ inst/CITATION | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index fcb4906145..61efcc403b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: knitr Type: Package Title: A General-Purpose Package for Dynamic Report Generation in R -Version: 1.48.4 +Version: 1.48.5 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Abhraneel", "Sarma", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index 98ac8ae18c..12ce0ffc21 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ - `asis_output()` was not passed to the `output` hook (thanks, @cderv, #2332). +- Avoid partial matching of the `Date/Publication` field when generating `citation('knitr')`, otherwise R will emit a warning when `options(warnPartialMatchDollar = TRUE)` (thanks, @fkohrt, #2361). + ## MAJOR CHANGES - Unbalanced chunk delimiters (fences) in R Markdown documents are strictly prohibited now. diff --git a/inst/CITATION b/inst/CITATION index 70200f965c..0d15e9abf7 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,4 +1,4 @@ -year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE) +year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta[['Date/Publication']], perl = TRUE) vers = paste('R package version', meta$Version) if (length(year) == 0) year = format(Sys.Date(), '%Y')