@readme/markdown 6.48.1 → 6.49.0
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.
- package/components/HTMLBlock/index.jsx +1 -1
- package/dist/main.js +9 -9
- package/dist/main.node.js +9 -9
- package/package.json +10 -10
|
@@ -16,7 +16,7 @@ const extractScripts = (html = '') => {
|
|
|
16
16
|
return [cleaned, () => scripts.map(js => window.eval(js))];
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
class HTMLBlock extends React.
|
|
19
|
+
class HTMLBlock extends React.PureComponent {
|
|
20
20
|
constructor(props) {
|
|
21
21
|
super(props);
|
|
22
22
|
[this.html, this.exec] = extractScripts(this.props.html);
|
package/dist/main.js
CHANGED
|
@@ -9736,10 +9736,10 @@ var extractScripts = function extractScripts() {
|
|
|
9736
9736
|
}];
|
|
9737
9737
|
};
|
|
9738
9738
|
|
|
9739
|
-
var HTMLBlock = /*#__PURE__*/function (_React$
|
|
9739
|
+
var HTMLBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
9740
9740
|
"use strict";
|
|
9741
9741
|
|
|
9742
|
-
_inherits(HTMLBlock, _React$
|
|
9742
|
+
_inherits(HTMLBlock, _React$PureComponent);
|
|
9743
9743
|
|
|
9744
9744
|
var _super = _createSuper(HTMLBlock);
|
|
9745
9745
|
|
|
@@ -9792,7 +9792,7 @@ var HTMLBlock = /*#__PURE__*/function (_React$Component) {
|
|
|
9792
9792
|
}]);
|
|
9793
9793
|
|
|
9794
9794
|
return HTMLBlock;
|
|
9795
|
-
}(React.
|
|
9795
|
+
}(React.PureComponent);
|
|
9796
9796
|
|
|
9797
9797
|
HTMLBlock.defaultProps = {
|
|
9798
9798
|
runScripts: false,
|
|
@@ -29309,12 +29309,8 @@ module.exports.sanitize = function (sanitizeSchema) {
|
|
|
29309
29309
|
/* @note: copied from https://github.com/rehypejs/rehype-minify/blob/main/packages/hast-util-to-string/index.js
|
|
29310
29310
|
*/
|
|
29311
29311
|
function toString(node) {
|
|
29312
|
-
|
|
29313
|
-
|
|
29314
|
-
return all(node);
|
|
29315
|
-
}
|
|
29316
|
-
|
|
29317
|
-
return 'value' in node ? node.value : ' ';
|
|
29312
|
+
// eslint-disable-next-line no-use-before-define
|
|
29313
|
+
return 'children' in node ? all(node) || one(node) : one(node);
|
|
29318
29314
|
}
|
|
29319
29315
|
|
|
29320
29316
|
function one(node) {
|
|
@@ -29326,6 +29322,10 @@ function one(node) {
|
|
|
29326
29322
|
|
|
29327
29323
|
if (node.type === 'text') {
|
|
29328
29324
|
return node.value;
|
|
29325
|
+
}
|
|
29326
|
+
|
|
29327
|
+
if ('value' in node) {
|
|
29328
|
+
return node.value;
|
|
29329
29329
|
} // eslint-disable-next-line no-use-before-define
|
|
29330
29330
|
|
|
29331
29331
|
|
package/dist/main.node.js
CHANGED
|
@@ -9736,10 +9736,10 @@ var extractScripts = function extractScripts() {
|
|
|
9736
9736
|
}];
|
|
9737
9737
|
};
|
|
9738
9738
|
|
|
9739
|
-
var HTMLBlock = /*#__PURE__*/function (_React$
|
|
9739
|
+
var HTMLBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
9740
9740
|
"use strict";
|
|
9741
9741
|
|
|
9742
|
-
_inherits(HTMLBlock, _React$
|
|
9742
|
+
_inherits(HTMLBlock, _React$PureComponent);
|
|
9743
9743
|
|
|
9744
9744
|
var _super = _createSuper(HTMLBlock);
|
|
9745
9745
|
|
|
@@ -9792,7 +9792,7 @@ var HTMLBlock = /*#__PURE__*/function (_React$Component) {
|
|
|
9792
9792
|
}]);
|
|
9793
9793
|
|
|
9794
9794
|
return HTMLBlock;
|
|
9795
|
-
}(React.
|
|
9795
|
+
}(React.PureComponent);
|
|
9796
9796
|
|
|
9797
9797
|
HTMLBlock.defaultProps = {
|
|
9798
9798
|
runScripts: false,
|
|
@@ -12131,12 +12131,8 @@ module.exports.sanitize = function (sanitizeSchema) {
|
|
|
12131
12131
|
/* @note: copied from https://github.com/rehypejs/rehype-minify/blob/main/packages/hast-util-to-string/index.js
|
|
12132
12132
|
*/
|
|
12133
12133
|
function toString(node) {
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
return all(node);
|
|
12137
|
-
}
|
|
12138
|
-
|
|
12139
|
-
return 'value' in node ? node.value : ' ';
|
|
12134
|
+
// eslint-disable-next-line no-use-before-define
|
|
12135
|
+
return 'children' in node ? all(node) || one(node) : one(node);
|
|
12140
12136
|
}
|
|
12141
12137
|
|
|
12142
12138
|
function one(node) {
|
|
@@ -12148,6 +12144,10 @@ function one(node) {
|
|
|
12148
12144
|
|
|
12149
12145
|
if (node.type === 'text') {
|
|
12150
12146
|
return node.value;
|
|
12147
|
+
}
|
|
12148
|
+
|
|
12149
|
+
if ('value' in node) {
|
|
12150
|
+
return node.value;
|
|
12151
12151
|
} // eslint-disable-next-line no-use-before-define
|
|
12152
12152
|
|
|
12153
12153
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "6.
|
|
5
|
+
"version": "6.49.0",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"browser": "dist/main.js",
|
|
8
8
|
"files": [
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
"@commitlint/config-angular": "^17.0.3",
|
|
74
74
|
"@commitlint/config-conventional": "^17.0.3",
|
|
75
75
|
"@hot-loader/react-dom": "^16.14.0",
|
|
76
|
-
"@readme/eslint-config": "^
|
|
76
|
+
"@readme/eslint-config": "^9.0.0",
|
|
77
77
|
"@readme/variable": "15.1.0",
|
|
78
78
|
"@semantic-release/changelog": "^6.0.1",
|
|
79
79
|
"@semantic-release/git": "^10.0.1",
|
|
80
80
|
"@testing-library/jest-dom": "^5.16.4",
|
|
81
81
|
"@testing-library/react": "^12.1.2",
|
|
82
|
-
"@tippyjs/react": "^4.
|
|
83
|
-
"babel-jest": "^28.1.
|
|
82
|
+
"@tippyjs/react": "^4.2.6",
|
|
83
|
+
"babel-jest": "^28.1.3",
|
|
84
84
|
"babel-loader": "^8.2.5",
|
|
85
|
-
"codemirror": "^5.
|
|
86
|
-
"core-js": "^3.
|
|
85
|
+
"codemirror": "^5.54.0",
|
|
86
|
+
"core-js": "^3.24.1",
|
|
87
87
|
"css-loader": "^6.7.1",
|
|
88
|
-
"eslint": "^8.
|
|
88
|
+
"eslint": "^8.21.0",
|
|
89
89
|
"husky": "^8.0.1",
|
|
90
90
|
"identity-obj-proxy": "^3.0.0",
|
|
91
91
|
"jest": "^28.1.3",
|
|
@@ -96,16 +96,16 @@
|
|
|
96
96
|
"mini-css-extract-plugin": "^2.6.1",
|
|
97
97
|
"node-sass": "^7.0.1",
|
|
98
98
|
"prettier": "^2.7.1",
|
|
99
|
-
"puppeteer": "^15.
|
|
99
|
+
"puppeteer": "^15.5.0",
|
|
100
100
|
"react": "^16.14.0",
|
|
101
101
|
"react-dom": "^16.14.0",
|
|
102
102
|
"react-hot-loader": "^4.13.0",
|
|
103
103
|
"regenerator-runtime": "^0.13.9",
|
|
104
|
-
"sass-loader": "^
|
|
104
|
+
"sass-loader": "^13.0.2",
|
|
105
105
|
"semantic-release": "^19.0.3",
|
|
106
106
|
"string.prototype.trimend": "^1.0.5",
|
|
107
107
|
"terser-webpack-plugin": "^5.3.3",
|
|
108
|
-
"webpack": "^5.
|
|
108
|
+
"webpack": "^5.74.0",
|
|
109
109
|
"webpack-cli": "^4.10.0",
|
|
110
110
|
"webpack-dev-server": "^4.9.3",
|
|
111
111
|
"webpack-merge": "^5.8.0"
|