@docusaurus/theme-classic 3.5.2-canary-6123 → 3.5.2-canary-6125

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.
@@ -16,6 +16,7 @@ export default function prismIncludeLanguages(PrismObject) {
16
16
  // avoid polluting global namespace.
17
17
  // You can mutate PrismObject: registering plugins, deleting languages... As
18
18
  // long as you don't re-assign it
19
+ const PrismBefore = globalThis.Prism;
19
20
  globalThis.Prism = PrismObject;
20
21
  additionalLanguages.forEach((lang) => {
21
22
  if (lang === 'php') {
@@ -25,5 +26,9 @@ export default function prismIncludeLanguages(PrismObject) {
25
26
  // eslint-disable-next-line global-require, import/no-dynamic-require
26
27
  require(`prismjs/components/prism-${lang}`);
27
28
  });
29
+ // Clean up and eventually restore former globalThis.Prism object (if any)
28
30
  delete globalThis.Prism;
31
+ if (typeof PrismBefore !== 'undefined') {
32
+ globalThis.Prism = PrismObject;
33
+ }
29
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "3.5.2-canary-6123",
3
+ "version": "3.5.2-canary-6125",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -20,19 +20,19 @@
20
20
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@docusaurus/core": "3.5.2-canary-6123",
24
- "@docusaurus/logger": "3.5.2-canary-6123",
25
- "@docusaurus/mdx-loader": "3.5.2-canary-6123",
26
- "@docusaurus/module-type-aliases": "3.5.2-canary-6123",
27
- "@docusaurus/plugin-content-blog": "3.5.2-canary-6123",
28
- "@docusaurus/plugin-content-docs": "3.5.2-canary-6123",
29
- "@docusaurus/plugin-content-pages": "3.5.2-canary-6123",
30
- "@docusaurus/theme-common": "3.5.2-canary-6123",
31
- "@docusaurus/theme-translations": "3.5.2-canary-6123",
32
- "@docusaurus/types": "3.5.2-canary-6123",
33
- "@docusaurus/utils": "3.5.2-canary-6123",
34
- "@docusaurus/utils-common": "3.5.2-canary-6123",
35
- "@docusaurus/utils-validation": "3.5.2-canary-6123",
23
+ "@docusaurus/core": "3.5.2-canary-6125",
24
+ "@docusaurus/logger": "3.5.2-canary-6125",
25
+ "@docusaurus/mdx-loader": "3.5.2-canary-6125",
26
+ "@docusaurus/module-type-aliases": "3.5.2-canary-6125",
27
+ "@docusaurus/plugin-content-blog": "3.5.2-canary-6125",
28
+ "@docusaurus/plugin-content-docs": "3.5.2-canary-6125",
29
+ "@docusaurus/plugin-content-pages": "3.5.2-canary-6125",
30
+ "@docusaurus/theme-common": "3.5.2-canary-6125",
31
+ "@docusaurus/theme-translations": "3.5.2-canary-6125",
32
+ "@docusaurus/types": "3.5.2-canary-6125",
33
+ "@docusaurus/utils": "3.5.2-canary-6125",
34
+ "@docusaurus/utils-common": "3.5.2-canary-6125",
35
+ "@docusaurus/utils-validation": "3.5.2-canary-6125",
36
36
  "@mdx-js/react": "^3.0.0",
37
37
  "clsx": "^2.0.0",
38
38
  "copy-text-to-clipboard": "^3.2.0",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=18.0"
64
64
  },
65
- "gitHead": "7af98a452165bdb84b9653d3da3cea109165e9ac"
65
+ "gitHead": "3f321d4a8e6f58b20c5a4c9d19c3bfe785d98d44"
66
66
  }
@@ -23,6 +23,8 @@ export default function prismIncludeLanguages(
23
23
  // avoid polluting global namespace.
24
24
  // You can mutate PrismObject: registering plugins, deleting languages... As
25
25
  // long as you don't re-assign it
26
+
27
+ const PrismBefore = globalThis.Prism;
26
28
  globalThis.Prism = PrismObject;
27
29
 
28
30
  additionalLanguages.forEach((lang) => {
@@ -34,5 +36,9 @@ export default function prismIncludeLanguages(
34
36
  require(`prismjs/components/prism-${lang}`);
35
37
  });
36
38
 
39
+ // Clean up and eventually restore former globalThis.Prism object (if any)
37
40
  delete (globalThis as Optional<typeof globalThis, 'Prism'>).Prism;
41
+ if (typeof PrismBefore !== 'undefined') {
42
+ globalThis.Prism = PrismObject;
43
+ }
38
44
  }