Skip to content

Commit

Permalink
Merge pull request #22 from timlrx/fix/large-numeric
Browse files Browse the repository at this point in the history
fix: handle more than 1 digit for numeric citations
  • Loading branch information
timlrx authored Mar 7, 2023
2 parents c01178f + d33bf21 commit f11f40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gen-citation.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const genCitation = (
// e.g. [1, 2]
let i = 0
const refIds = entries.map((e) => e.id)
const output = citationText.replace(/\d/g, function (d) {
const output = citationText.replace(/\d+/g, function (d) {
const url = `<a href="#bib-${refIds[i].toLowerCase()}">${d}</a>`
i++
return url
Expand Down

0 comments on commit f11f40e

Please sign in to comment.