paleolimbot / rbbt

R Interface to the Better BiBTex Zotero Connector
142 stars 25 forks source link

Detect citekeys that have colons in them #37

Closed andrewheiss closed 1 year ago

andrewheiss commented 1 year ago

Right now, rbbt fails to detect citekeys that have colons in them. For instance, in an .Rmd file that contains this:

Lorem ipsum dolor sit amet, consectetur adipisicing elit [@Smith:2022]

…running rbbt::bbt_update_bib("whatever.Rmd") results in this error:

Error: not found: Smith

One of the default citekey patterns from BibDesk on macOS is authorname:year, and those carry over to Zotero when migrating from BibDesk to Zotero. Additionally, users can configure Better BibTeX to use colons in the citekey pattern.

This PR adds support for detecting citekeys with colons by expanding the detection regex.