From 2cb8f5fb90830b0a64b0f6913df7ebaff2ae1976 Mon Sep 17 00:00:00 2001 From: gcb <56283+gcb@users.noreply.github.com> Date: Tue, 26 Dec 2023 19:24:39 -0300 Subject: [PATCH] skip article references to bibliography. --- js/content/html-doc.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/content/html-doc.js b/js/content/html-doc.js index 32c53a77..5f332e55 100644 --- a/js/content/html-doc.js +++ b/js/content/html-doc.js @@ -168,7 +168,13 @@ var readAloudDoc = new function() { } function addMissingPunctuation(text) { - return text.replace(/(\w)(\s*?\r?\n)/g, "$1.$2"); + text = removeReferences(text); + return text.replace(/(\w)(\s*?\r?\n)/g, "$1. $2"); + } + + // drop references[1] such as those. + function removeReferences(text){ + return text.replace(/\[[0-9]+\]/g, ''); } function findHeadingsFor(block, prevBlock) {