@docusaurus/theme-live-codeblock 0.0.0-5793 → 0.0.0-5795
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.
|
@@ -101,7 +101,7 @@ export default function Playground({children, transformCode, ...props}) {
|
|
|
101
101
|
return (
|
|
102
102
|
<div className={styles.playgroundContainer}>
|
|
103
103
|
<LiveProvider
|
|
104
|
-
code={children
|
|
104
|
+
code={children?.replace(/\n$/, '')}
|
|
105
105
|
noInline={noInline}
|
|
106
106
|
transformCode={transformCode ?? DEFAULT_TRANSFORM_CODE}
|
|
107
107
|
theme={prismTheme}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-live-codeblock",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5795",
|
|
4
4
|
"description": "Docusaurus live code block component.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-live-codeblock.d.ts",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
28
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
29
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-5795",
|
|
27
|
+
"@docusaurus/theme-common": "0.0.0-5795",
|
|
28
|
+
"@docusaurus/theme-translations": "0.0.0-5795",
|
|
29
|
+
"@docusaurus/utils-validation": "0.0.0-5795",
|
|
30
30
|
"@philpl/buble": "^0.19.7",
|
|
31
31
|
"clsx": "^2.0.0",
|
|
32
32
|
"fs-extra": "^11.1.1",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"tslib": "^2.6.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@docusaurus/types": "0.0.0-
|
|
37
|
+
"@docusaurus/types": "0.0.0-5795",
|
|
38
38
|
"@types/buble": "^0.20.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=18.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "d7c482923d9d82f344d1055ce2b17fd2df0f8a38"
|
|
48
48
|
}
|
|
@@ -120,7 +120,7 @@ export default function Playground({
|
|
|
120
120
|
return (
|
|
121
121
|
<div className={styles.playgroundContainer}>
|
|
122
122
|
<LiveProvider
|
|
123
|
-
code={children
|
|
123
|
+
code={children?.replace(/\n$/, '')}
|
|
124
124
|
noInline={noInline}
|
|
125
125
|
transformCode={transformCode ?? DEFAULT_TRANSFORM_CODE}
|
|
126
126
|
theme={prismTheme}
|
|
@@ -24,7 +24,8 @@ declare module '@theme/Playground' {
|
|
|
24
24
|
type LiveProviderProps = React.ComponentProps<typeof LiveProvider>;
|
|
25
25
|
|
|
26
26
|
export interface Props extends CodeBlockProps, LiveProviderProps {
|
|
27
|
-
|
|
27
|
+
// Allow empty live playgrounds
|
|
28
|
+
children?: string;
|
|
28
29
|
}
|
|
29
30
|
export default function Playground(props: LiveProviderProps): JSX.Element;
|
|
30
31
|
}
|