riboseinc / asciidoctor-bibliography

Citations in AsciiDoc
MIT License
30 stars 8 forks source link

Multi-Citation of more than two keys not working #92

Closed Fiech closed 5 years ago

Fiech commented 5 years ago

If more than two citations are used in a multi-citation, only the first and the last elements are used:

foo.adoc:

= Test
:bibliography-database: bibliography.bib

== Chapter

cite:[keyA]+[keyB]+[keyC]+[keyD]

== Bibliography

bibliography::[]

bibliography.bib:

@book{keyA,
  title = {Title A},
  author = {Author A},
  year = {2015},
}

@book{keyB,
  title = {Title B},
  author = {Author B},
  year = {2016},
}

@book{keyC,
  title = {Title C},
  author = {Author C},
  year = {2017},
}

@book{keyD,
  title = {Title D},
  author = {Author D},
  year = {2018},
}

command:

asciidoctor -r asciidoctor-bibliography foo.adoc

output: output

Tested with the HEAD of this repo, asciidoctor 1.5.8 and 2.0.10dev (from the repo)

ronaldtse commented 5 years ago

@Fiech thanks for reporting this -- it sounds like a parsing issue.

@paolobrasolin do you have time to look at this?

paolobrasolin commented 5 years ago

@Fiech thanks for the excellent report!

I found and fixed the bug in #93 @ronaldtse

ronaldtse commented 5 years ago

Thanks @paolobrasolin ! It’s merged now.

@Fiech could you let us know if you can confirm the fix? Thanks!

Fiech commented 5 years ago

@paolobrasolin @ronaldtse Awesome! In my MNWE as well in my actual document this works perfectly. Thank you for the quick fix!

ronaldtse commented 5 years ago

That’s great! Sounds like a gem release should be on the way...