riboseinc / asciidoctor-bibliography

Citations in AsciiDoc
MIT License
30 stars 8 forks source link

Fix issue where including bibliography macro without using any citations throws error #83

Closed mdko closed 5 years ago

mdko commented 6 years ago

This is a fix for issue #82 I just made.

I chose to make the change in index.rb (rather than earlier by checking if the bibliographer's occuring_keys map is empty, say for example here) because the preprocessor still needs to remove the bibliography::[] line when rendering indices for the final output.

I made a small test to isolate where the problem occurs. With this fix, I can successfully compile .adoc that have the bibliography macro even if no citations are used.

ronaldtse commented 5 years ago

@mdko thank you for contributing! Looks good to me.