downlit
downlit copied to clipboard
fail gracefully if packages cannot be referenced
When using {packagename}
, downlit tries to autolink the package using several heuristics. This sometimes fails if either the heuristics are not capable of discovering the package or (much more likely) if there is a typo in the package name. I currently get very obscure error messages when this happens.
For example, I had a typo in the yaml metadata in one of my articles (vignettes/database.Rmd
)
title: "Database Stuff"
description: "Instruction for using the `{RSQLiteTYPO}` database"
When trying to render the articles index, this shows the following error
pkgdown::build_articles_index()
#> Error in readRDS(con) :
#> embedded nul in string: '\ndoParal\001pes (>=lurviqiter\004\0\t\0\0\0!'
It would be very useful if this could be replaced by something like this
pkgdown::build_articles_index()
#> Error: unable to link to package 'RSQLiteTYPO'