larsgw / citation.js

Citation.js converts formats like BibTeX, Wikidata JSON and ContentMine JSON to CSL-JSON to convert to other formats like APA, Vancouver and back to BibTeX.
https://citation.js.org/
MIT License
219 stars 30 forks source link

SyntaxError: Escape sequence not recognized: {\textbar} #194

Closed phiresky closed 3 years ago

phiresky commented 4 years ago
@misc{noauthor_zotero_nodate,
    title = {Zotero {\textbar} {Your} personal research assistant},
    url = {https://www.zotero.org/},
    abstract = {Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share research.},
    urldate = {2019-12-12},
    journal = {www.zotero.org}
}

extraction error SyntaxError: Escape sequence not recognized: {\textbar}

that bibtex is generated by Zotero, see https://en.wikipedia.org/api/rest_v1/data/citation/bibtex/https%3A%2F%2Fwww.zotero.org%2F

phiresky commented 4 years ago

looks like this is a simple addition to https://github.com/citation-js/citation-js/blob/master/packages/plugin-bibtex/src/input/tokens.json ?

pvzhelnov commented 4 years ago
  {\textbar}
+ {\textless}
+ {\textgreater}
larsgw commented 4 years ago

Sorry for not replying earlier.

looks like this is a simple addition to https://github.com/citation-js/citation-js/blob/master/packages/plugin-bibtex/src/input/tokens.json ?

That is true for that file, but the v0.5 branch has some more recent development, including a new parser, that I am trying to finish.

larsgw commented 3 years ago

This issue should be fixed in v0.5.0-alpha.10. If not, please re-open the issue.