aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/string/replaceall
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:02:49 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commit01b0e12ba27b5069248fd09235e9a7143915ee30 (patch)
tree0e9edf538dc3fa3331e1dbb79239b58186765f86 /files/zh-cn/web/javascript/reference/global_objects/string/replaceall
parent6ca84f1794af830ada9736d7289ce29aabb04ca3 (diff)
downloadtranslated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.gz
translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.bz2
translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.zip
remove `notranslate` class in zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/replaceall')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/string/replaceall/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/replaceall/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/replaceall/index.html
index cbd76d71b7..c9d892e3f7 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/string/replaceall/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/string/replaceall/index.html
@@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replaceAll
<h2 id="语法">语法</h2>
-<pre class="syntaxbox notranslate">const newStr = <var>str</var>.replaceAll(<var>regexp</var>|<var>substr</var>, <var>newSubstr</var>|<var>function</var>)</pre>
+<pre class="syntaxbox">const newStr = <var>str</var>.replaceAll(<var>regexp</var>|<var>substr</var>, <var>newSubstr</var>|<var>function</var>)</pre>
<div class="blockIndicator note">
<p>当使用一个 `regex`时,您必须设置全局(“ g”)标志,<br>
@@ -123,20 +123,20 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replaceAll
<h3 id="使用_replaceAll">使用 replaceAll</h3>
-<pre class="brush: js notranslate">'aabbcc'.replaceAll('b', '.');
+<pre class="brush: js">'aabbcc'.replaceAll('b', '.');
// 'aa..cc'</pre>
<h3 id="非全局_regex_抛出">非全局 regex 抛出</h3>
<p>使用正则表达式搜索值时,它必须是全局的。这将行不通:</p>
-<pre class="brush: js; example-bad notranslate">'aabbcc'.replaceAll(/b/, '.');
+<pre class="brush: js; example-bad">'aabbcc'.replaceAll(/b/, '.');
TypeError: replaceAll must be called with a global RegExp
</pre>
<p>这将可以正常运行:</p>
-<pre class="brush: js; example-good notranslate">'aabbcc'.replaceAll(/b/g, '.');
+<pre class="brush: js; example-good">'aabbcc'.replaceAll(/b/g, '.');
"aa..cc"
</pre>