summaryrefslogtreecommitdiff
path: root/ext/fg/js/source-input.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-07-25 20:07:54 -0700
committerAlex Yatskov <alex@foosoft.net>2016-07-25 20:07:54 -0700
commitf88f8dc97fa4baa354a7e04c125dd6968a22c85f (patch)
treed8e6cb61234aa5bb5b55e329fad764933062657e /ext/fg/js/source-input.js
parentd26ecab0b521e8da19c01521e5a5a3e3ada331eb (diff)
Sentence and URL support
Diffstat (limited to 'ext/fg/js/source-input.js')
-rw-r--r--ext/fg/js/source-input.js8
1 files changed, 6 insertions, 2 deletions
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() {