summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/utils/transcript.utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/app/utils/transcript.utils.js')
-rw-r--r--animism-align/frontend/app/utils/transcript.utils.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/animism-align/frontend/app/utils/transcript.utils.js b/animism-align/frontend/app/utils/transcript.utils.js
index dc351c0..2a089a0 100644
--- a/animism-align/frontend/app/utils/transcript.utils.js
+++ b/animism-align/frontend/app/utils/transcript.utils.js
@@ -87,9 +87,13 @@ export const buildParagraphs = (annotationOrder, sectionCount, footnoteCount) =>
paragraphs.push(currentParagraph)
}
+ // accumulate footnotes
if (annotation.type === 'footnote') {
+ // bump footnote count and attach it to this annotation, so we can find it later
footnoteCount += 1
annotation.footnote_id = footnoteCount
+ // set annotation start point to the start of the previous sentence
+ annotation.start_ts = currentParagraph.annotations[currentParagraph.annotations.length - 1].start_ts
footnotes.push(annotation)
}