yihui / knitr

A general-purpose tool for dynamic report generation in R
https://yihui.org/knitr/
2.36k stars 873 forks source link

empty write_bib() for packages without URL #2304

Closed bastistician closed 8 months ago

bastistician commented 8 months ago

To reproduce, call write_bib() for an installed package with no URL in its DESCRIPTION, for example:

knitr::write_bib("gridSVG")

currently produces nothing but an empty line. This is a regression in knitr 1.44 due to #2264. The return logic in https://github.com/yihui/knitr/blob/0f5a15d9ea0b8edfa7a9ed417af0fd54986d5c39/R/citation.R#L92 seems at fault.

yihui commented 8 months ago

Should be fixed now. Thanks for the report! Too bad I didn't catch it sooner since I just made a CRAN release yesterday.

github-actions[bot] commented 2 months ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.