aboutsummaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-04-21 17:15:08 +0200
committerGitHub <noreply@github.com>2024-04-21 15:15:08 +0000
commit07258ecc35c1a05aa1581a54c9f47a40ce3d76c9 (patch)
tree0a73bc6c1224710906ef3cded2a19399fc626f12 /test/data
parent22904d166d5ea33667458ccd0fde36e77d0ff65d (diff)
rework text processors (#793)24.4.21.0
* rework text processors * rename text-preprocessors file * Fix search header left margins on small screens (#839) * Refocuses search input on backspace (#840) Fixes #775. Note that this behavior gets overridden if backspace is set as a shortcut action. * Change hotkey triggering condition to account for IME usage (#837) _isKeyCharacterInput only worked when not using an IME, as inside of an IME when a keydown event is fired, the key is reported as "Process", which does not have a key.length equal to 1. This resulted in hotkeys being triggered while typing, which this commit fixes. --------- Co-authored-by: James Maa <jmaa@berkeley.edu> Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Co-authored-by: Andrew Thomas Sartor <andrew@sartor.net>
Diffstat (limited to 'test/data')
-rw-r--r--test/data/anki-note-builder-test-results.json16
-rw-r--r--test/data/translator-test-inputs.json4
-rw-r--r--test/data/translator-test-results-note-data1.json4
-rw-r--r--test/data/translator-test-results.json8
4 files changed, 16 insertions, 16 deletions
diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json
index d8d5ab0f..162be7fe 100644
--- a/test/data/anki-note-builder-test-results.json
+++ b/test/data/anki-note-builder-test-results.json
@@ -2548,8 +2548,8 @@
"audio": "",
"clipboard-image": "",
"clipboard-text": "",
- "cloze-body": "打",
- "cloze-body-kana": "だ",
+ "cloze-body": "打(う)",
+ "cloze-body-kana": "だ(う)",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "",
@@ -2577,8 +2577,8 @@
"screenshot": "",
"search-query": "fullQuery",
"selection-text": "",
- "sentence": "cloze-prefix打cloze-suffix",
- "sentence-furigana": "cloze-prefix打cloze-suffix",
+ "sentence": "cloze-prefix打(う)cloze-suffix",
+ "sentence-furigana": "cloze-prefix打(う)cloze-suffix",
"tags": "n",
"url": "<a href=\"url:\">url:</a>"
},
@@ -2586,8 +2586,8 @@
"audio": "",
"clipboard-image": "",
"clipboard-text": "",
- "cloze-body": "打",
- "cloze-body-kana": "ダース",
+ "cloze-body": "打(う)",
+ "cloze-body-kana": "ダース(う)",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "",
@@ -2615,8 +2615,8 @@
"screenshot": "",
"search-query": "fullQuery",
"selection-text": "",
- "sentence": "cloze-prefix打cloze-suffix",
- "sentence-furigana": "cloze-prefix打cloze-suffix",
+ "sentence": "cloze-prefix打(う)cloze-suffix",
+ "sentence-furigana": "cloze-prefix打(う)cloze-suffix",
"tags": "abbr, n",
"url": "<a href=\"url:\">url:</a>"
}
diff --git a/test/data/translator-test-inputs.json b/test/data/translator-test-inputs.json
index c9047716..9e62954e 100644
--- a/test/data/translator-test-inputs.json
+++ b/test/data/translator-test-inputs.json
@@ -191,7 +191,7 @@
null,
[
{
- "pattern": "\\(([^)]*)(?:\\)|$)",
+ "pattern": "\\(([^)]*)(?:\\))",
"flags": "g",
"replacement": ""
}
@@ -214,7 +214,7 @@
null,
[
{
- "pattern": "\\(([^)]*)(?:\\)|$)",
+ "pattern": "\\(([^)]*)(?:\\))",
"flags": "g",
"replacement": "$1"
}
diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json
index f580ac53..f0f32fa8 100644
--- a/test/data/translator-test-results-note-data1.json
+++ b/test/data/translator-test-results-note-data1.json
@@ -22773,7 +22773,7 @@
"type": "term",
"id": 1,
"source": "打",
- "rawSource": "打",
+ "rawSource": "打(う)",
"sourceTerm": "打",
"inflectionRuleChainCandidates": [
{
@@ -23087,7 +23087,7 @@
"type": "term",
"id": 2,
"source": "打",
- "rawSource": "打",
+ "rawSource": "打(う)",
"sourceTerm": "打",
"inflectionRuleChainCandidates": [
{
diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json
index da2f8da2..b3574b46 100644
--- a/test/data/translator-test-results.json
+++ b/test/data/translator-test-results.json
@@ -12904,7 +12904,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxOriginalTextLength": 1,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -12912,7 +12912,7 @@
"reading": "だ",
"sources": [
{
- "originalText": "打",
+ "originalText": "打(う)",
"transformedText": "打",
"deinflectedText": "打",
"matchType": "exact",
@@ -13072,7 +13072,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxOriginalTextLength": 1,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -13080,7 +13080,7 @@
"reading": "ダース",
"sources": [
{
- "originalText": "打",
+ "originalText": "打(う)",
"transformedText": "打",
"deinflectedText": "打",
"matchType": "exact",