Skip to content

Commit 780b587

Browse files
committed
javascript.lang: Add highlighting for String.prototype.replaceAll
This was added for ES2021.
1 parent 566794d commit 780b587

File tree

7 files changed

+7
-1
lines changed

7 files changed

+7
-1
lines changed

data/language-specs/javascript-values.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@
602602
<keyword>padStart</keyword> <!-- ES2017 -->
603603
<keyword>raw</keyword>
604604
<keyword>repeat</keyword>
605+
<keyword>replaceAll</keyword> <!-- ES2021 -->
605606
<keyword>replace</keyword>
606607
<keyword>search</keyword>
607608
<keyword>slice</keyword>

data/language-specs/javascript.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
Supported level: ES2020
135135
136136
Supported ES2021 proposals:
137-
* (none yet)
137+
* String.prototype.replaceAll
138138
139139
Features from Annex B of the spec are not highlighted to
140140
discourage their use, except:

tests/syntax-highlighting/file.j

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ array.flatMap(); // ES2019
584584
string.matchAll(); // ES2020
585585
Promise.allSettled(); // ES2020
586586
BigInt.asUintN(); // ES2020
587+
string.replaceAll(); // ES2021
587588

588589

589590
/*

tests/syntax-highlighting/file.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ array.flatMap(); // ES2019
283283
string.matchAll(); // ES2020
284284
Promise.allSettled(); // ES2020
285285
BigInt.asUintN(); // ES2020
286+
string.replaceAll(); // ES2021
286287

287288

288289
/*

tests/syntax-highlighting/file.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ array.flatMap(); // ES2019
340340
string.matchAll(); // ES2020
341341
Promise.allSettled(); // ES2020
342342
BigInt.asUintN(); // ES2020
343+
string.replaceAll(); // ES2021
343344

344345

345346
/*

tests/syntax-highlighting/file.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ array.flatMap(); // ES2019
868868
string.matchAll(); // ES2020
869869
Promise.allSettled(); // ES2020
870870
BigInt.asUintN(); // ES2020
871+
string.replaceAll(); // ES2021
871872

872873

873874
/*

tests/syntax-highlighting/file.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ array.flatMap(); // ES2019
976976
string.matchAll(); // ES2020
977977
Promise.allSettled(); // ES2020
978978
BigInt.asUintN(); // ES2020
979+
string.replaceAll(); // ES2021
979980

980981

981982
/*

0 commit comments

Comments
 (0)