From 17734029155ec4a88da87cd098517b65291b52a0 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Sun, 28 Aug 2022 20:07:03 +0800
Subject: [PATCH 1/4] website: add `backToUp` button.
---
package.json | 1 +
website/App.tsx | 2 ++
2 files changed, 3 insertions(+)
diff --git a/package.json b/package.json
index 58c9fb52..7798043f 100644
--- a/package.json
+++ b/package.json
@@ -75,6 +75,7 @@
"@types/react": "~18.0.9",
"@types/react-dom": "~18.0.3",
"@types/react-test-renderer": "~18.0.0",
+ "@uiw/react-back-to-top": "^1.2.0",
"@uiw/react-codesandbox": "~1.1.4",
"@uiw/react-github-corners": "~1.5.3",
"@uiw/react-shields": "~1.1.2",
diff --git a/website/App.tsx b/website/App.tsx
index e0ce0fb8..3836fc5d 100644
--- a/website/App.tsx
+++ b/website/App.tsx
@@ -2,6 +2,7 @@ import { useState } from 'react';
import GitHubCorners from '@uiw/react-github-corners';
import Github from '@uiw/react-shields/esm/github';
import Npm from '@uiw/react-shields/esm/npm';
+import BackToUp from '@uiw/react-back-to-top';
import '@wcj/dark-mode';
import logo from './logo.svg';
import './App.css';
@@ -14,6 +15,7 @@ const App = () => {
const [value, setValue] = useState('');
return (
+ Top
From 9805216b21b6251514478a0c3097b284a83506f9 Mon Sep 17 00:00:00 2001
From: Tan Nhu
Date: Thu, 29 Sep 2022 17:33:46 -0700
Subject: [PATCH 2/4] Update README.md (#204)
Fix a bug in `Disable Header links` example section.
Given a heading:
```
# A demo of `react-markdown`
```
Example will yield:
```
A demo of
```
Which is not correct, the text `react-markdown` is ignored.
Withe the fix, example will yield correct output:
```
A demo of react-markdown
```
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9232035c..660e2148 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,7 @@ function Demo() {
source={source}
rehypeRewrite={(node, index, parent) => {
if (node.tagName === "a" && parent && /^h(1|2|3|4|5|6)/.test(parent.tagName)) {
- parent.children = [parent.children[1]];
+ parent.children = parent.children.slice(1)
}
}}
/>
From 1777d81dafddbd9f45599d0287543e7d0807e244 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Tue, 18 Oct 2022 08:46:12 +0800
Subject: [PATCH 3/4] fix: Fix `skipHtml` does not work. (#205)
---
src/index.tsx | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/index.tsx b/src/index.tsx
index efe792b9..ac1bbcc6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -5,7 +5,6 @@ import { PluggableList } from 'unified';
import gfm from 'remark-gfm';
import slug from 'rehype-slug';
import headings from 'rehype-autolink-headings';
-import rehypeRaw from 'rehype-raw';
import rehypeAttrs from 'rehype-attr';
import rehypeIgnore from 'rehype-ignore';
import rehypePrism from 'rehype-prism-plus';
@@ -71,7 +70,6 @@ export default React.forwardRef((props
const rehypePlugins: PluggableList = [
reservedMeta,
[rehypePrism, { ignoreMissing: true }],
- rehypeRaw,
slug,
headings,
rehypeIgnore,
From 5c94966fe17f2a84fd58c598cfb4fb1db5a736d3 Mon Sep 17 00:00:00 2001
From: jaywcjlove <398188662@qq.com>
Date: Tue, 18 Oct 2022 08:47:11 +0800
Subject: [PATCH 4/4] released v4.1.1 (#205)
---
package.json | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 7798043f..483c4f57 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@uiw/react-markdown-preview",
- "version": "4.1.0",
+ "version": "4.1.1",
"description": "React component preview markdown text in web browser. The minimal amount of CSS to replicate the GitHub Markdown style.",
"homepage": "https://uiwjs.github.io/react-markdown-preview",
"main": "lib/index.js",
@@ -61,7 +61,6 @@
"rehype-autolink-headings": "~6.1.1",
"rehype-ignore": "^1.0.1",
"rehype-prism-plus": "~1.5.0",
- "rehype-raw": "~6.1.1",
"rehype-rewrite": "~3.0.6",
"rehype-slug": "~5.0.1",
"remark-gfm": "~3.0.1",