asciidoctor / asciidoctor-bibtex

Add bibtex citation support for asciidoc documents
Other
69 stars 27 forks source link

Hyphen in citationkey causes unknown reference #100

Open ryan-carpenter opened 1 week ago

ryan-carpenter commented 1 week ago
  1. Cite a reference, such as bibitem:[plain‐hyphen1234] using a hyphen (‐) in the citationkey.
  2. Convert the document using asciidoctor -r asciidoctor-bibtex.
  3. Notice unknown reference error for the hyphenated citationkey.

I confirmed that the citationkeys in asciidoc and bibtex files matched, replaced the hyphens with hyphen-minus (-) as in hyphen-minus1234, and then converted the document successfully without the unknown reference error.

I could not find any regular expressions in the asciidoctor-bibtex code that would prevent a hyphen from matching the bibtex citationkey, so I suspect that the issue might be with a dependency.

A similar issue with "dash" (actually, - hyphen-minus) was resolved previously in https://github.com/asciidoctor/asciidoctor-bibtex/issues/16.

linux ruby 3.3.0 asciidoctor 2.0.23 asciidoctor-bibtex 0.9.0

Edit: corrected hex codes.