Skip to content

Commit e4e677a

Browse files
committed
refactor: replace dependency @mapbox/rehype-prism -> rehype-prism-plus.
1 parent 53a86a0 commit e4e677a

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "@uiw/react-textarea-code-editor",
33
"version": "1.6.0",
44
"description": "A simple code editor with syntax highlighting.",
5-
"homepage": "https://uiwjs.github.io/react-textarea-code-editor/",
65
"main": "cjs/index.js",
76
"module": "esm/index.js",
87
"scripts": {
@@ -69,7 +68,7 @@
6968
},
7069
"dependencies": {
7170
"@babel/runtime": "~7.17.2",
72-
"@mapbox/rehype-prism": "~0.8.0",
71+
"rehype-prism-plus": "~1.3.2",
7372
"rehype": "~12.0.1"
7473
},
7574
"devDependencies": {
@@ -81,14 +80,14 @@
8180
"@types/react-dom": "~17.0.11",
8281
"@types/react-test-renderer": "~17.0.1",
8382
"@uiw/react-github-corners": "~1.5.3",
84-
"@uiw/react-markdown-preview": "~3.5.0",
85-
"@uiw/react-loader": "~4.12.2",
86-
"code-example": "~3.3.1",
83+
"@uiw/react-markdown-preview": "^4.0.4",
84+
"@uiw/react-loader": "^4.14.2",
85+
"code-example": "^3.3.1",
8786
"compile-less-cli": "~1.8.11",
8887
"husky": "~7.0.4",
8988
"kkt": "~7.1.5",
9089
"lint-staged": "~12.3.4",
91-
"prettier": "~2.5.1",
90+
"prettier": "~2.6.0",
9291
"react": "~17.0.2",
9392
"react-dom": "~17.0.2",
9493
"react-test-renderer": "~17.0.2",

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" data-color-mode="light">
33

44
<head>
55
<meta charset="utf-8">

src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { PluggableList } from 'unified';
22
import { rehype } from 'rehype';
3-
// @ts-ignore
4-
import rehypePrism from '@mapbox/rehype-prism';
3+
import rehypePrism from 'rehype-prism-plus';
54

65
export const processHtml = (html: string, plugins: PluggableList = [[rehypePrism, { ignoreMissing: true }]]) => {
76
return rehype()

0 commit comments

Comments
 (0)