summaryrefslogtreecommitdiff
path: root/ext/fg/js/document.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-06 19:34:32 -0400
committerGitHub <noreply@github.com>2020-05-06 19:34:32 -0400
commitd6ae3229614fb11fee799387d17347ea97509c59 (patch)
tree795e9ba8b5c198a44a5ca5d8c346dbf0e46a54c0 /ext/fg/js/document.js
parentf7df6254d6f71d5331b000dcbd27271bd2c3006f (diff)
Text scanning update (#507)
* Fix unity test missing a parameter * Update docSentenceExtract to not rescan content
Diffstat (limited to 'ext/fg/js/document.js')
-rw-r--r--ext/fg/js/document.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js
index 6103c7c5..d639bc86 100644
--- a/ext/fg/js/document.js
+++ b/ext/fg/js/document.js
@@ -159,7 +159,7 @@ function docSentenceExtract(source, extent) {
const sourceLocal = source.clone();
const position = sourceLocal.setStartOffset(extent);
- sourceLocal.setEndOffset(position + extent);
+ sourceLocal.setEndOffset(extent * 2 - position, true);
const content = sourceLocal.text();
let quoteStack = [];