Skip to content

Commit

Permalink
clean: remove rehype-attr dependency. #194
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 14, 2021
1 parent 97b4174 commit 50b6b83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
25 changes: 12 additions & 13 deletions package.json
Expand Up @@ -40,18 +40,6 @@
],
"author": "kenny wong <wowohoo@qq.com>",
"license": "MIT",
"peerDependencies": {
"@babel/runtime": ">=7.11.0",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"dependencies": {
"@babel/runtime": "7.15.4",
"@codemirror/basic-setup": "0.19.0",
"@codemirror/state": "0.19.2",
"@codemirror/theme-one-dark": "0.19.0",
"@codemirror/view": "0.19.9"
},
"jest": {
"coverageReporters": [
"lcov",
Expand All @@ -69,6 +57,18 @@
"prettier --write"
]
},
"peerDependencies": {
"@babel/runtime": ">=7.11.0",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"dependencies": {
"@babel/runtime": "7.15.4",
"@codemirror/basic-setup": "0.19.0",
"@codemirror/state": "0.19.2",
"@codemirror/theme-one-dark": "0.19.0",
"@codemirror/view": "0.19.9"
},
"devDependencies": {
"@codemirror/lang-cpp": "0.19.1",
"@codemirror/lang-html": "0.19.3",
Expand All @@ -94,7 +94,6 @@
"@uiw/react-markdown-preview": "3.4.0",
"@uiw/react-shields": "1.1.2",
"@uiw/reset.css": "1.0.5",
"rehype-attr": "2.0.6",
"code-example": "3.3.1",
"husky": "7.0.2",
"jest": "27.2.5",
Expand Down
7 changes: 1 addition & 6 deletions website/App.tsx
Expand Up @@ -3,7 +3,6 @@ import GitHubCorners from '@uiw/react-github-corners';
import Github from '@uiw/react-shields/esm/github';
import Npm from '@uiw/react-shields/esm/npm';
import MarkdownPreview from '@uiw/react-markdown-preview';
import rehypeAttrs from 'rehype-attr';
import { javascript } from '@codemirror/lang-javascript';
import { html } from '@codemirror/lang-html';
import { css } from '@codemirror/lang-css';
Expand Down Expand Up @@ -236,11 +235,7 @@ export default function App() {
<input type="text" value={placeholder} onChange={(evn) => setPlaceholder(evn.target.value)} />
</label>
</div>
<MarkdownPreview
className={styles.markdown}
rehypePlugins={[[rehypeAttrs, { properties: 'attr' }]]}
source={DocumentStr.replace(/([\s\S]*)<!--dividing-->/, '')}
/>
<MarkdownPreview className={styles.markdown} source={DocumentStr.replace(/([\s\S]*)<!--dividing-->/, '')} />
<div className={styles.footer}>
<Github user="uiwjs" repo="react-codemirror">
<Github.Social type="forks" href="https://github.com/uiwjs/react-codemirror" />
Expand Down

0 comments on commit 50b6b83

Please sign in to comment.