aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/options-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 /ext/js/data/options-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 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index cb7946f7..cb58206f 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -460,7 +460,8 @@ class OptionsUtil {
{async: true, update: this._updateVersion8.bind(this)},
{async: false, update: this._updateVersion9.bind(this)},
{async: true, update: this._updateVersion10.bind(this)},
- {async: true, update: this._updateVersion11.bind(this)}
+ {async: false, update: this._updateVersion11.bind(this)},
+ {async: false, update: this._updateVersion12.bind(this)}
];
}
@@ -811,4 +812,15 @@ class OptionsUtil {
}
return options;
}
+
+ _updateVersion12(options) {
+ // Version 12 changes:
+ // Changed sentenceParsing.enableTerminationCharacters to sentenceParsing.terminationCharacterMode.
+ for (const profile of options.profiles) {
+ const {sentenceParsing} = profile.options;
+ sentenceParsing.terminationCharacterMode = sentenceParsing.enableTerminationCharacters ? 'custom' : 'newlines';
+ delete sentenceParsing.enableTerminationCharacters;
+ }
+ return options;
+ }
}