@rspress/plugin-playground 2.0.23 → 2.1.0-beta.1

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/dist/cli/index.js CHANGED
@@ -23,8 +23,8 @@ const parseImports = (code, sourceExt)=>{
23
23
  const getNodeMeta = (node, metaName)=>{
24
24
  if (!node.meta) return;
25
25
  const meta = node.meta.split(' ');
26
- const item = meta.find((x)=>x.startsWith(metaName));
27
- if (item?.startsWith(`${metaName}=`)) return item.slice(metaName.length + 1).replace(/'"`/g, '');
26
+ const item = meta.find((x)=>x === metaName || x.startsWith(`${metaName}=`));
27
+ if (item?.startsWith(`${metaName}=`)) return item.slice(metaName.length + 1).replace(/['"`]/g, '');
28
28
  return item;
29
29
  };
30
30
  function createPlaygroundNode(currentNode, attrs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/plugin-playground",
3
- "version": "2.0.23",
3
+ "version": "2.1.0-beta.1",
4
4
  "description": "A plugin for rspress to preview the code block in markdown/mdx file.",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@babel/types": "^7.29.8",
39
- "@rsbuild/plugin-react": "~2.1.0",
40
- "@rspress/plugin-playground": "2.0.23",
39
+ "@rsbuild/plugin-react": "~2.1.1",
40
+ "@rspress/plugin-playground": "2.1.0-beta.1",
41
41
  "@types/babel__core": "^7.20.5",
42
42
  "@types/babel__standalone": "^7.1.9",
43
43
  "@types/babel__traverse": "^7.28.0",
@@ -53,7 +53,7 @@
53
53
  "unified": "^11.0.5"
54
54
  },
55
55
  "peerDependencies": {
56
- "@rspress/core": "^2.0.10",
56
+ "@rspress/core": "^2.1.0-beta.1",
57
57
  "react": ">=18.0.0",
58
58
  "react-dom": ">=18.0.0"
59
59
  },