aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/util.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-04-07 21:17:13 -0700
committerAlex Yatskov <alex@foosoft.net>2017-04-07 21:17:13 -0700
commitc4b1a4a5b4811d7aaa70b3b83f740c9e3d2b86be (patch)
tree0bb0caf5b506ea90555b79ae2ccda54da8756506 /ext/mixed/js/util.js
parentbbe4afecf6a56f4bdaaafe083a3bf67191fd9cde (diff)
wip
Diffstat (limited to 'ext/mixed/js/util.js')
-rw-r--r--ext/mixed/js/util.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mixed/js/util.js b/ext/mixed/js/util.js
index aeeb830e..eae54f49 100644
--- a/ext/mixed/js/util.js
+++ b/ext/mixed/js/util.js
@@ -21,12 +21,12 @@
* Cloze
*/
-function clozeBuild(sentence, offset, source) {
+function clozeBuild(sentence, source) {
return {
- sentence: sentence.trim(),
- prefix: sentence.substring(0, offset).trim(),
+ sentence: sentence.text.trim(),
+ prefix: sentence.text.substring(0, sentence.offset).trim(),
body: source.trim(),
- suffix: sentence.substring(offset + source.length).trim()
+ suffix: sentence.text.substring(sentence.offset + source.length).trim()
};
}