Skip to content

Commit d75da93

Browse files
committed
fix: remove Chinese quotation marks prefix and suffix
1 parent 488a249 commit d75da93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ function translate(query, completion) {
9595
} else {
9696
targetTxt = choices[0].text.trim();
9797
}
98-
99-
if (targetTxt.startsWith('"')) {
98+
99+
if (targetTxt.startsWith('"') || targetTxt.startsWith("「")) {
100100
targetTxt = targetTxt.slice(1);
101101
}
102-
if (targetTxt.endsWith('"')) {
102+
if (targetTxt.endsWith('"') || targetTxt.endsWith("」")) {
103103
targetTxt = targetTxt.slice(0, -1);
104104
}
105-
105+
106106
completion({
107107
result: {
108108
from: query.detectFrom,

0 commit comments

Comments
 (0)