summaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 441d56ec..6c335346 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -684,13 +684,30 @@ class OptionsUtil {
// Version 8 changes:
// Added translation.textReplacements.
// Moved anki.sentenceExt to sentenceParsing.scanExtent.
+ // Added sentenceParsing.enableTerminationCharacters.
+ // Added sentenceParsing.terminationCharacters.
for (const profile of options.profiles) {
profile.options.translation.textReplacements = {
searchOriginal: true,
groups: []
};
profile.options.sentenceParsing = {
- scanExtent: profile.options.anki.sentenceExt
+ scanExtent: profile.options.anki.sentenceExt,
+ enableTerminationCharacters: true,
+ terminationCharacters: [
+ {enabled: true, character1: '「', character2: '」', includeCharacterAtStart: false, includeCharacterAtEnd: false},
+ {enabled: true, character1: '『', character2: '』', includeCharacterAtStart: false, includeCharacterAtEnd: false},
+ {enabled: true, character1: '"', character2: '"', includeCharacterAtStart: false, includeCharacterAtEnd: false},
+ {enabled: true, character1: '\'', character2: '\'', includeCharacterAtStart: false, includeCharacterAtEnd: false},
+ {enabled: true, character1: '.', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true},
+ {enabled: true, character1: '!', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true},
+ {enabled: true, character1: '?', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true},
+ {enabled: true, character1: '.', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true},
+ {enabled: true, character1: '。', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true},
+ {enabled: true, character1: '!', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true},
+ {enabled: true, character1: '?', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true},
+ {enabled: true, character1: '…', character2: null, includeCharacterAtStart: false, includeCharacterAtEnd: true}
+ ]
};
delete profile.options.anki.sentenceExt;
}