Skip to content

Commit 50b6b83

Browse files
committed
clean: remove rehype-attr dependency. #194
1 parent 97b4174 commit 50b6b83

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@
4040
],
4141
"author": "kenny wong <[email protected]>",
4242
"license": "MIT",
43-
"peerDependencies": {
44-
"@babel/runtime": ">=7.11.0",
45-
"react": ">=16.8.0",
46-
"react-dom": ">=16.8.0"
47-
},
48-
"dependencies": {
49-
"@babel/runtime": "7.15.4",
50-
"@codemirror/basic-setup": "0.19.0",
51-
"@codemirror/state": "0.19.2",
52-
"@codemirror/theme-one-dark": "0.19.0",
53-
"@codemirror/view": "0.19.9"
54-
},
5543
"jest": {
5644
"coverageReporters": [
5745
"lcov",
@@ -69,6 +57,18 @@
6957
"prettier --write"
7058
]
7159
},
60+
"peerDependencies": {
61+
"@babel/runtime": ">=7.11.0",
62+
"react": ">=16.8.0",
63+
"react-dom": ">=16.8.0"
64+
},
65+
"dependencies": {
66+
"@babel/runtime": "7.15.4",
67+
"@codemirror/basic-setup": "0.19.0",
68+
"@codemirror/state": "0.19.2",
69+
"@codemirror/theme-one-dark": "0.19.0",
70+
"@codemirror/view": "0.19.9"
71+
},
7272
"devDependencies": {
7373
"@codemirror/lang-cpp": "0.19.1",
7474
"@codemirror/lang-html": "0.19.3",
@@ -94,7 +94,6 @@
9494
"@uiw/react-markdown-preview": "3.4.0",
9595
"@uiw/react-shields": "1.1.2",
9696
"@uiw/reset.css": "1.0.5",
97-
"rehype-attr": "2.0.6",
9897
"code-example": "3.3.1",
9998
"husky": "7.0.2",
10099
"jest": "27.2.5",

website/App.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import GitHubCorners from '@uiw/react-github-corners';
33
import Github from '@uiw/react-shields/esm/github';
44
import Npm from '@uiw/react-shields/esm/npm';
55
import MarkdownPreview from '@uiw/react-markdown-preview';
6-
import rehypeAttrs from 'rehype-attr';
76
import { javascript } from '@codemirror/lang-javascript';
87
import { html } from '@codemirror/lang-html';
98
import { css } from '@codemirror/lang-css';
@@ -236,11 +235,7 @@ export default function App() {
236235
<input type="text" value={placeholder} onChange={(evn) => setPlaceholder(evn.target.value)} />
237236
</label>
238237
</div>
239-
<MarkdownPreview
240-
className={styles.markdown}
241-
rehypePlugins={[[rehypeAttrs, { properties: 'attr' }]]}
242-
source={DocumentStr.replace(/([\s\S]*)<!--dividing-->/, '')}
243-
/>
238+
<MarkdownPreview className={styles.markdown} source={DocumentStr.replace(/([\s\S]*)<!--dividing-->/, '')} />
244239
<div className={styles.footer}>
245240
<Github user="uiwjs" repo="react-codemirror">
246241
<Github.Social type="forks" href="https://github.com/uiwjs/react-codemirror" />

0 commit comments

Comments
 (0)