From f88f8dc97fa4baa354a7e04c125dd6968a22c85f Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 25 Jul 2016 20:07:54 -0700 Subject: Sentence and URL support --- ext/fg/js/source-input.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ext/fg/js/source-input.js') diff --git a/ext/fg/js/source-input.js b/ext/fg/js/source-input.js index 9f5a76a0..d3c92793 100644 --- a/ext/fg/js/source-input.js +++ b/ext/fg/js/source-input.js @@ -18,9 +18,13 @@ class TextSourceInput { - constructor(input) { + constructor(input, length=-1) { this.input = input; - this.length = -1; + this.length = length; + } + + clone() { + return new TextSourceInput(this.input, this.length); } text() { -- cgit v1.2.3