[gtksourceview: 4/14] javascript.lang: Add highlighting for String.prototype.replaceAll
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview: 4/14] javascript.lang: Add highlighting for String.prototype.replaceAll
- Date: Thu, 11 Jun 2020 17:26:38 +0000 (UTC)
commit 780b58798d58c41ea5300f99728de25a3b5bd2b5
Author: Jeffery To <jeffery to gmail com>
Date: Wed Jun 3 05:49:19 2020 +0800
javascript.lang: Add highlighting for String.prototype.replaceAll
This was added for ES2021.
data/language-specs/javascript-values.lang | 1 +
data/language-specs/javascript.lang | 2 +-
tests/syntax-highlighting/file.j | 1 +
tests/syntax-highlighting/file.js | 1 +
tests/syntax-highlighting/file.jsx | 1 +
tests/syntax-highlighting/file.ts | 1 +
tests/syntax-highlighting/file.tsx | 1 +
7 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/data/language-specs/javascript-values.lang b/data/language-specs/javascript-values.lang
index e5078860..4ee2b319 100644
--- a/data/language-specs/javascript-values.lang
+++ b/data/language-specs/javascript-values.lang
@@ -602,6 +602,7 @@
<keyword>padStart</keyword> <!-- ES2017 -->
<keyword>raw</keyword>
<keyword>repeat</keyword>
+ <keyword>replaceAll</keyword> <!-- ES2021 -->
<keyword>replace</keyword>
<keyword>search</keyword>
<keyword>slice</keyword>
diff --git a/data/language-specs/javascript.lang b/data/language-specs/javascript.lang
index c06522ff..df39df16 100644
--- a/data/language-specs/javascript.lang
+++ b/data/language-specs/javascript.lang
@@ -134,7 +134,7 @@
Supported level: ES2020
Supported ES2021 proposals:
- * (none yet)
+ * String.prototype.replaceAll
Features from Annex B of the spec are not highlighted to
discourage their use, except:
diff --git a/tests/syntax-highlighting/file.j b/tests/syntax-highlighting/file.j
index e4bdf23d..b91d7f0c 100644
--- a/tests/syntax-highlighting/file.j
+++ b/tests/syntax-highlighting/file.j
@@ -584,6 +584,7 @@ array.flatMap(); // ES2019
string.matchAll(); // ES2020
Promise.allSettled(); // ES2020
BigInt.asUintN(); // ES2020
+string.replaceAll(); // ES2021
/*
diff --git a/tests/syntax-highlighting/file.js b/tests/syntax-highlighting/file.js
index 4d43c5dc..9db22959 100644
--- a/tests/syntax-highlighting/file.js
+++ b/tests/syntax-highlighting/file.js
@@ -283,6 +283,7 @@ array.flatMap(); // ES2019
string.matchAll(); // ES2020
Promise.allSettled(); // ES2020
BigInt.asUintN(); // ES2020
+string.replaceAll(); // ES2021
/*
diff --git a/tests/syntax-highlighting/file.jsx b/tests/syntax-highlighting/file.jsx
index 9b43a6a2..9506d3ec 100644
--- a/tests/syntax-highlighting/file.jsx
+++ b/tests/syntax-highlighting/file.jsx
@@ -340,6 +340,7 @@ array.flatMap(); // ES2019
string.matchAll(); // ES2020
Promise.allSettled(); // ES2020
BigInt.asUintN(); // ES2020
+string.replaceAll(); // ES2021
/*
diff --git a/tests/syntax-highlighting/file.ts b/tests/syntax-highlighting/file.ts
index 81c0fe1d..868e9362 100644
--- a/tests/syntax-highlighting/file.ts
+++ b/tests/syntax-highlighting/file.ts
@@ -868,6 +868,7 @@ array.flatMap(); // ES2019
string.matchAll(); // ES2020
Promise.allSettled(); // ES2020
BigInt.asUintN(); // ES2020
+string.replaceAll(); // ES2021
/*
diff --git a/tests/syntax-highlighting/file.tsx b/tests/syntax-highlighting/file.tsx
index ee08e480..353c177c 100644
--- a/tests/syntax-highlighting/file.tsx
+++ b/tests/syntax-highlighting/file.tsx
@@ -976,6 +976,7 @@ array.flatMap(); // ES2019
string.matchAll(); // ES2020
Promise.allSettled(); // ES2020
BigInt.asUintN(); // ES2020
+string.replaceAll(); // ES2021
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]