@uiw/react-md-editor 3.20.7 → 3.20.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @uiw/copy-to-clipboard v1.0.12
|
|
3
|
-
* Copy to clipboard.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2021 Kenny Wang
|
|
6
|
-
* https://github.com/uiwjs/copy-to-clipboard.git
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the MIT license.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
1
|
/*!
|
|
12
2
|
* Determine if an object is a Buffer
|
|
13
3
|
*
|
|
@@ -34,3 +24,15 @@
|
|
|
34
24
|
* This source code is licensed under the MIT license found in the
|
|
35
25
|
* LICENSE file in the root directory of this source tree.
|
|
36
26
|
*/
|
|
27
|
+
|
|
28
|
+
/**!
|
|
29
|
+
* @uiw/copy-to-clipboard v1.0.14
|
|
30
|
+
* Copy to clipboard.
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) 2023 Kenny Wang
|
|
33
|
+
* https://github.com/uiwjs/copy-to-clipboard.git
|
|
34
|
+
*
|
|
35
|
+
* @website: https://uiwjs.github.io/copy-to-clipboard
|
|
36
|
+
|
|
37
|
+
* Licensed under the MIT license
|
|
38
|
+
*/
|
|
@@ -6,14 +6,14 @@ import rehypePrism from 'rehype-prism-plus';
|
|
|
6
6
|
import { EditorContext } from '../../Context';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
function html2Escape(sHtml) {
|
|
9
|
-
return sHtml
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
return sHtml
|
|
10
|
+
// .replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g, (str: string) => {
|
|
11
|
+
// return str.replace(
|
|
12
|
+
// /[<&"]/g,
|
|
13
|
+
// (c: string) => (({ '<': '<', '>': '>', '&': '&', '"': '"' } as Record<string, string>)[c]),
|
|
14
|
+
// );
|
|
15
|
+
// })
|
|
16
|
+
.replace(/[<&"]/g, c => ({
|
|
17
17
|
'<': '<',
|
|
18
18
|
'>': '>',
|
|
19
19
|
'&': '&',
|
|
@@ -14,16 +14,14 @@ var _Context = require("../../Context");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
var _templateObject;
|
|
16
16
|
function html2Escape(sHtml) {
|
|
17
|
-
return sHtml
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
26
|
-
}).replace(/[<&"]/g, function (c) {
|
|
17
|
+
return sHtml
|
|
18
|
+
// .replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g, (str: string) => {
|
|
19
|
+
// return str.replace(
|
|
20
|
+
// /[<&"]/g,
|
|
21
|
+
// (c: string) => (({ '<': '<', '>': '>', '&': '&', '"': '"' } as Record<string, string>)[c]),
|
|
22
|
+
// );
|
|
23
|
+
// })
|
|
24
|
+
.replace(/[<&"]/g, function (c) {
|
|
27
25
|
return {
|
|
28
26
|
'<': '<',
|
|
29
27
|
'>': '>',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uiw/react-md-editor",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.8",
|
|
4
4
|
"description": "A markdown editor with preview, implemented with React.js and TypeScript.",
|
|
5
5
|
"homepage": "https://uiwjs.github.io/react-md-editor/",
|
|
6
6
|
"author": "kenny wang <wowohoo@qq.com>",
|
|
@@ -5,17 +5,19 @@ import { IProps } from '../../Editor';
|
|
|
5
5
|
import { EditorContext } from '../../Context';
|
|
6
6
|
|
|
7
7
|
function html2Escape(sHtml: string) {
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return (
|
|
9
|
+
sHtml
|
|
10
|
+
// .replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g, (str: string) => {
|
|
11
|
+
// return str.replace(
|
|
12
|
+
// /[<&"]/g,
|
|
13
|
+
// (c: string) => (({ '<': '<', '>': '>', '&': '&', '"': '"' } as Record<string, string>)[c]),
|
|
14
|
+
// );
|
|
15
|
+
// })
|
|
16
|
+
.replace(
|
|
11
17
|
/[<&"]/g,
|
|
12
18
|
(c: string) => (({ '<': '<', '>': '>', '&': '&', '"': '"' } as Record<string, string>)[c]),
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
.replace(
|
|
16
|
-
/[<&"]/g,
|
|
17
|
-
(c: string) => (({ '<': '<', '>': '>', '&': '&', '"': '"' } as Record<string, string>)[c]),
|
|
18
|
-
);
|
|
19
|
+
)
|
|
20
|
+
);
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export interface MarkdownProps extends IProps, React.HTMLAttributes<HTMLPreElement> {}
|