Skip to content

Commit

Permalink
fix: footnote
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Feb 20, 2025
1 parent 3c0dffc commit bb57e3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ ${references}
// Check if correction is needed
const needsCorrection =
(footnotes.length === answer.references.length && footnotes.every(n => n === footnotes[0])) ||
(footnotes.every(n => n === footnotes[0]) && parseInt(footnotes[0]) > answer.references.length);
(footnotes.every(n => n === footnotes[0]) && parseInt(footnotes[0]) > answer.references.length) ||
(footnotes.length > 0 && footnotes.every(n => parseInt(n) > answer.references.length));

// New case: we have more references than footnotes
if (answer.references.length > footnotes.length && !needsCorrection) {
Expand Down

0 comments on commit bb57e3f

Please sign in to comment.