@docusaurus/theme-common 3.10.1 → 3.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/utils/emojiUtils.js
CHANGED
|
@@ -21,9 +21,11 @@ export function extractLeadingEmoji(input) {
|
|
|
21
21
|
if (!grapheme) {
|
|
22
22
|
return { emoji: null, rest: input };
|
|
23
23
|
}
|
|
24
|
-
// Leading grapheme contains an emoji
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
// Leading grapheme contains an emoji
|
|
25
|
+
// Covers flags/ZWJ/skin tones, excludes digits
|
|
26
|
+
// See https://github.com/facebook/docusaurus/pull/12072
|
|
27
|
+
// eslint-disable-next-line
|
|
28
|
+
if (!/^\p{RGI_Emoji}$/v.test(grapheme)) {
|
|
27
29
|
return { emoji: null, rest: input };
|
|
28
30
|
}
|
|
29
31
|
return { emoji: grapheme, rest: input.slice(grapheme.length) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emojiUtils.js","sourceRoot":"","sources":["../../src/utils/emojiUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAC,WAAW,EAAE,UAAU,EAAC,CAAC,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAI/C,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAEvD,iEAAiE;IACjE,MAAM,QAAQ,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;IAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;IACpC,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"emojiUtils.js","sourceRoot":"","sources":["../../src/utils/emojiUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAC,WAAW,EAAE,UAAU,EAAC,CAAC,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAI/C,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAEvD,iEAAiE;IACjE,MAAM,QAAQ,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;IAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;IACpC,CAAC;IAED,qCAAqC;IACrC,+CAA+C;IAC/C,wDAAwD;IACxD,2BAA2B;IAC3B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvC,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;IACpC,CAAC;IAED,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAC,CAAC;AAC/D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-common",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.2",
|
|
4
4
|
"description": "Common code for Docusaurus themes.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@docusaurus/mdx-loader": "3.10.
|
|
34
|
-
"@docusaurus/module-type-aliases": "3.10.
|
|
35
|
-
"@docusaurus/utils": "3.10.
|
|
36
|
-
"@docusaurus/utils-common": "3.10.
|
|
33
|
+
"@docusaurus/mdx-loader": "3.10.2",
|
|
34
|
+
"@docusaurus/module-type-aliases": "3.10.2",
|
|
35
|
+
"@docusaurus/utils": "3.10.2",
|
|
36
|
+
"@docusaurus/utils-common": "3.10.2",
|
|
37
37
|
"@types/history": "^4.7.11",
|
|
38
38
|
"@types/react": "*",
|
|
39
39
|
"@types/react-router-config": "*",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"utility-types": "^3.10.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@docusaurus/core": "3.10.
|
|
48
|
-
"@docusaurus/types": "3.10.
|
|
47
|
+
"@docusaurus/core": "3.10.2",
|
|
48
|
+
"@docusaurus/types": "3.10.2",
|
|
49
49
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
50
50
|
"fs-extra": "^11.1.1",
|
|
51
51
|
"lodash": "^4.17.21"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=20.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "f37f9035584917a97a260b91fc2842cba4f8b94f"
|
|
62
62
|
}
|
package/src/utils/emojiUtils.ts
CHANGED
|
@@ -29,11 +29,11 @@ export function extractLeadingEmoji(input: string): {
|
|
|
29
29
|
return {emoji: null, rest: input};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
// Leading grapheme contains an emoji
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
) {
|
|
32
|
+
// Leading grapheme contains an emoji
|
|
33
|
+
// Covers flags/ZWJ/skin tones, excludes digits
|
|
34
|
+
// See https://github.com/facebook/docusaurus/pull/12072
|
|
35
|
+
// eslint-disable-next-line
|
|
36
|
+
if (!/^\p{RGI_Emoji}$/v.test(grapheme)) {
|
|
37
37
|
return {emoji: null, rest: input};
|
|
38
38
|
}
|
|
39
39
|
|