@rspress/plugin-preview 0.0.0-nightly-20240131160303 → 0.0.0-nightly-20240202160128
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/virtual-demo.js +2 -2
- package/package.json +3 -3
package/dist/virtual-demo.js
CHANGED
@@ -53,8 +53,8 @@ style_inject_es_default(css_248z);
|
|
53
53
|
import { jsx, jsxs } from "react/jsx-runtime";
|
54
54
|
function Demo(props) {
|
55
55
|
const { pathname } = useLocation();
|
56
|
-
const
|
57
|
-
const normalizedId = normalizeId(
|
56
|
+
const id = pathname.split("/").filter(Boolean).pop();
|
57
|
+
const normalizedId = normalizeId(id || "");
|
58
58
|
if (props.iframePosition === "fixed") {
|
59
59
|
const renderDemos = demos.flat().filter((item) => new RegExp(`${normalizedId}_\\d+`).test(item.id));
|
60
60
|
return renderDemos.length > 0 ? /* @__PURE__ */ jsx(NoSSR, { children: /* @__PURE__ */ jsxs("div", { className: "preview-container", children: [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/plugin-preview",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20240202160128",
|
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": {
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"remark-gfm": "3.0.1",
|
26
26
|
"rspack-plugin-virtual-module": "0.1.12",
|
27
27
|
"lodash": "4.17.21",
|
28
|
-
"@rspress/shared": "0.0.0-nightly-
|
28
|
+
"@rspress/shared": "0.0.0-nightly-20240202160128"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"@types/mdast": "^3.0.10",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"peerDependencies": {
|
46
46
|
"react": ">=17",
|
47
47
|
"react-router-dom": "^6.8.1",
|
48
|
-
"@rspress/core": "0.0.0-nightly-
|
48
|
+
"@rspress/core": "0.0.0-nightly-20240202160128"
|
49
49
|
},
|
50
50
|
"files": [
|
51
51
|
"dist",
|