Fix citation deduping (#2)

This commit is contained in:
Jacob Lee
2023-10-03 20:34:18 -07:00
committed by GitHub
parent 216b03e331
commit 0ee3f7597a
+1 -1
View File
@@ -72,7 +72,7 @@ const createAnswerElements = (
matches.forEach((match) => {
const sourceNum = parseInt(match[1], 10);
const resolvedNum = sourceIndexMap.get(sourceNum) ?? 10;
if (prevCitationEndIndex !== match.index) {
if ((prevCitationEndIndex + 1) !== match.index) {
adjacentCitations = [];
}
if (match.index !== null && resolvedNum < filteredSources.length) {