Skip to content

Commit

Permalink
released v2.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 3, 2023
1 parent f79c325 commit cb3c591
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "markdown-react-code-preview-loader",
"version": "2.1.7",
"version": "2.1.8",
"description": "Index react example text in markdown, converted to React components.",
"homepage": "https://kktjs.github.io/markdown-react-code-preview-loader",
"author": "SunLxy <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.1.7",
"version": "2.1.8",
"packages": ["website", "core"]
}
4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "website",
"version": "2.1.7",
"version": "2.1.8",
"description": "Simple React package development project example template.",
"private": true,
"scripts": {
Expand Down Expand Up @@ -33,7 +33,7 @@
"@types/react": "18.0.8",
"@types/react-dom": "18.0.3",
"kkt": "~7.4.17",
"markdown-react-code-preview-loader": "2.1.7"
"markdown-react-code-preview-loader": "2.1.8"
},
"eslintConfig": {
"extends": [
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/docs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function HomePage() {
<Loader style={{ width: '100%' }} loading={loading} tip="loading...">
<MarkdownPreview
source={mdData.source}
style={{ background: 'transparent' }}
rehypeRewrite={(node: Root | RootContent, index: number, parent: Root | Element) => {
if (node.type === 'element' && parent && parent.type === 'root' && /h(1|2|3|4|5|6)/.test(node.tagName)) {
const child = node.children && (node.children[0] as Element);
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/example/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function ExamplePage() {
<Loader style={{ width: '100%' }} loading={loading} tip="loading...">
<MarkdownPreview
disableCopy={true}
style={{ background: 'transparent' }}
source={mdData.source}
rehypeRewrite={(node: Root | RootContent, index: number, parent: Root | Element) => {
if (node.type === 'element' && parent && parent.type === 'root' && /h(1|2|3|4|5|6)/.test(node.tagName)) {
Expand Down

0 comments on commit cb3c591

Please sign in to comment.