ropensci / bibtex

bibtex parser for R
https://docs.ropensci.org/bibtex/
36 stars 12 forks source link

read.bib with '?' in key #9

Closed mwmclean closed 7 years ago

mwmclean commented 9 years ago

read.bib does not work if the .bib file has a question mark in the "key".

tmp <- tempfile(fileext = ".bib")  
entry <- "@Misc{key?,\n author = \"Smith, Bob\",\n title = \"The Title\",\n year = 2012, \n}"
writeLines(entry, tmp)
read.bib(tmp)
## Warning message:
## In read.bib(tmp) : 
## C:\Users\MMCLEA~1.ADS\AppData\Local\Temp\Rtmp6ZP3yZ\file86058c626ee.bib:1:0
##  syntax error, unexpected TOKEN_LITERAL, expecting TOKEN_COMMA
##  Dropping the entry `k` (starting at line 1)