We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cddddc5 commit 21b16bfCopy full SHA for 21b16bf
src/controller/immersive.ts
@@ -60,6 +60,13 @@ export function RegisterTranslator(ctx: Context) {
60
if (!translatedText)
61
continue
62
63
+ // Skip if the translated text is the same as input
64
+ if (
65
+ translatedText.toLowerCase() === phrase.toLowerCase()
66
+ || translatedText.toLowerCase() === match[0].toLowerCase()
67
+ )
68
+ continue
69
+
70
const startPos = editor.document.positionAt(match.index)
71
const endPos = editor.document.positionAt(match.index + phrase.length)
72
const range = new Range(startPos, endPos)
0 commit comments