You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2019/08/20 07:07:51 UTC

[incubator-echarts] branch master updated: refinement: shortened _trim regex

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a88b6e1  refinement: shortened _trim regex
a88b6e1 is described below

commit a88b6e116ee57506ae3228c648dd0ad673376eb5
Author: hejinxin <he...@baidu.com>
AuthorDate: Thu Jun 6 12:09:48 2019 +0800

    refinement: shortened _trim regex
---
 src/util/number.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/number.js b/src/util/number.js
index 77e8966..efc4d74 100644
--- a/src/util/number.js
+++ b/src/util/number.js
@@ -31,7 +31,7 @@ import * as zrUtil from 'zrender/src/core/util';
 var RADIAN_EPSILON = 1e-4;
 
 function _trim(str) {
-    return str.replace(/^\s+/, '').replace(/\s+$/, '');
+    return str.replace(/^\s+|\s+$/g, '');
 }
 
 /**


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