You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/02/07 14:48:14 UTC

[echarts-bot] branch master updated: fix code style

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-bot.git


The following commit(s) were added to refs/heads/master by this push:
     new a1e2e88  fix code style
a1e2e88 is described below

commit a1e2e882ccc4bf1439996a5901bd3a6c2e0fe421
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sun Feb 7 22:47:45 2021 +0800

    fix code style
---
 src/translator.js       | 12 ++++++------
 test/translator.test.js |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/translator.js b/src/translator.js
index 888c4e9..a6313bd 100644
--- a/src/translator.js
+++ b/src/translator.js
@@ -42,13 +42,13 @@ function detectLanguage(text, detectAll) {
 }
 
 function detectEnglish(text) {
-  const lang = detectLanguage(text, true);
-  return lang[0][0] === 'eng'
-      && (!lang[1] || (lang[1][0] === 'sco' && lang[1][1] > 0.9) || lang[1][1] < 0.9);
+    const lang = detectLanguage(text, true);
+    return lang[0][0] === 'eng'
+        && (!lang[1] || (lang[1][0] === 'sco' && lang[1][1] > 0.9) || lang[1][1] < 0.9);
 }
 
 module.exports = {
-  translate,
-  detectLanguage,
-  detectEnglish
+    translate,
+    detectLanguage,
+    detectEnglish
 }
diff --git a/test/translator.test.js b/test/translator.test.js
index 496841e..3e64e0d 100644
--- a/test/translator.test.js
+++ b/test/translator.test.js
@@ -1,5 +1,5 @@
-const { removeCodeAndComment } = require('../src/util')
-const { detectEnglish } = require('../src/translator')
+const { removeCodeAndComment } = require('../src/util');
+const { detectEnglish } = require('../src/translator');
 
 const str = `
 ### What problem does this feature solve?


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org