aboutsummaryrefslogtreecommitdiff
path: root/test/test-document-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-16 15:24:38 -0400
committerGitHub <noreply@github.com>2021-05-16 15:24:38 -0400
commit66d048832f2dc30e11e6be4c68beab23c7d8adef (patch)
tree9cb1d83faacf133f61c3a96156ea6de1541e5233 /test/test-document-util.js
parent41ee167dfdfcd794634e0459185a929e814b0493 (diff)
Sentence termination character mode (#1682)
* Change enableTerminationCharacters to terminationCharacterMode * Update settings * Update sentence extraction * Update tests * Add tests
Diffstat (limited to 'test/test-document-util.js')
-rw-r--r--test/test-document-util.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test-document-util.js b/test/test-document-util.js
index 52fabf97..e5966034 100644
--- a/test/test-document-util.js
+++ b/test/test-document-util.js
@@ -129,7 +129,8 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
resultType,
sentenceScanExtent,
sentence,
- hasImposter
+ hasImposter,
+ terminateAtNewlines
} = testElement.dataset;
const elementFromPointValue = querySelectorChildOrSelf(testElement, elementFromPointSelector);
@@ -140,6 +141,7 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
startOffset = parseInt(startOffset, 10);
endOffset = parseInt(endOffset, 10);
sentenceScanExtent = parseInt(sentenceScanExtent, 10);
+ terminateAtNewlines = (terminateAtNewlines !== 'false');
assert.notStrictEqual(elementFromPointValue, null);
assert.notStrictEqual(caretRangeFromPointValue, null);
@@ -200,6 +202,7 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
source,
false,
sentenceScanExtent,
+ terminateAtNewlines,
terminatorMap,
forwardQuoteMap,
backwardQuoteMap