@readme/markdown 6.41.1 → 6.43.1
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/README.md +1 -0
- package/components/{HTMLBlock.jsx → HTMLBlock/index.jsx} +29 -3
- package/components/HTMLBlock/style.scss +5 -0
- package/components/index.js +5 -7
- package/dist/main.css +1 -1
- package/dist/main.js +106 -272
- package/dist/main.node.js +106 -272
- package/package.json +2 -4
- package/styles/components.scss +1 -7
package/dist/main.node.js
CHANGED
|
@@ -9686,9 +9686,11 @@ module.exports.GlossaryContext = GlossaryContext;
|
|
|
9686
9686
|
|
|
9687
9687
|
/***/ }),
|
|
9688
9688
|
|
|
9689
|
-
/***/
|
|
9689
|
+
/***/ 822:
|
|
9690
9690
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9691
9691
|
|
|
9692
|
+
var _extends = __webpack_require__(7154);
|
|
9693
|
+
|
|
9692
9694
|
var _slicedToArray = __webpack_require__(3038);
|
|
9693
9695
|
|
|
9694
9696
|
var _classCallCheck = __webpack_require__(4575);
|
|
@@ -9711,7 +9713,7 @@ var React = __webpack_require__(4466);
|
|
|
9711
9713
|
|
|
9712
9714
|
var PropTypes = __webpack_require__(5697);
|
|
9713
9715
|
|
|
9714
|
-
var MATCH_SCRIPT_TAGS = /<script\b[^>]*>([\s\S]*?)<\/script
|
|
9716
|
+
var MATCH_SCRIPT_TAGS = /<script\b[^>]*>([\s\S]*?)<\/script *>\n?/gim;
|
|
9715
9717
|
|
|
9716
9718
|
var extractScripts = function extractScripts() {
|
|
9717
9719
|
var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -9729,6 +9731,14 @@ var extractScripts = function extractScripts() {
|
|
|
9729
9731
|
});
|
|
9730
9732
|
}];
|
|
9731
9733
|
};
|
|
9734
|
+
/**
|
|
9735
|
+
* @hack: https://stackoverflow.com/a/30930653/659661
|
|
9736
|
+
*/
|
|
9737
|
+
|
|
9738
|
+
|
|
9739
|
+
var escapeHTML = function escapeHTML(html) {
|
|
9740
|
+
return document.createElement('div').appendChild(document.createTextNode(html)).parentNode.innerHTML;
|
|
9741
|
+
};
|
|
9732
9742
|
|
|
9733
9743
|
var HTMLBlock = /*#__PURE__*/function (_React$Component) {
|
|
9734
9744
|
"use strict";
|
|
@@ -9762,6 +9772,16 @@ var HTMLBlock = /*#__PURE__*/function (_React$Component) {
|
|
|
9762
9772
|
}, {
|
|
9763
9773
|
key: "render",
|
|
9764
9774
|
value: function render() {
|
|
9775
|
+
var _this$props = this.props,
|
|
9776
|
+
html = _this$props.html,
|
|
9777
|
+
safeMode = _this$props.safeMode;
|
|
9778
|
+
|
|
9779
|
+
if (safeMode) {
|
|
9780
|
+
return /*#__PURE__*/React.createElement("pre", {
|
|
9781
|
+
className: "html-unsafe"
|
|
9782
|
+
}, /*#__PURE__*/React.createElement("code", null, escapeHTML(html)));
|
|
9783
|
+
}
|
|
9784
|
+
|
|
9765
9785
|
return /*#__PURE__*/React.createElement("div", {
|
|
9766
9786
|
className: "rdmd-html",
|
|
9767
9787
|
dangerouslySetInnerHTML: {
|
|
@@ -9775,17 +9795,30 @@ var HTMLBlock = /*#__PURE__*/function (_React$Component) {
|
|
|
9775
9795
|
}(React.Component);
|
|
9776
9796
|
|
|
9777
9797
|
HTMLBlock.defaultProps = {
|
|
9778
|
-
runScripts: false
|
|
9798
|
+
runScripts: false,
|
|
9799
|
+
safeMode: false
|
|
9779
9800
|
};
|
|
9780
9801
|
HTMLBlock.propTypes = {
|
|
9781
9802
|
html: PropTypes.string,
|
|
9782
|
-
runScripts: PropTypes.any
|
|
9803
|
+
runScripts: PropTypes.any,
|
|
9804
|
+
safeMode: PropTypes.bool
|
|
9805
|
+
};
|
|
9806
|
+
|
|
9807
|
+
var CreateHtmlBlock = function CreateHtmlBlock(_ref) {
|
|
9808
|
+
var safeMode = _ref.safeMode;
|
|
9809
|
+
return (// eslint-disable-next-line react/display-name
|
|
9810
|
+
function (props) {
|
|
9811
|
+
return /*#__PURE__*/React.createElement(HTMLBlock, _extends({}, props, {
|
|
9812
|
+
safeMode: safeMode
|
|
9813
|
+
}));
|
|
9814
|
+
}
|
|
9815
|
+
);
|
|
9783
9816
|
};
|
|
9784
9817
|
|
|
9785
|
-
module.exports = function (sanitize) {
|
|
9818
|
+
module.exports = function (sanitize, opts) {
|
|
9786
9819
|
sanitize.tagNames.push('html-block');
|
|
9787
9820
|
sanitize.attributes['html-block'] = ['html', 'runScripts'];
|
|
9788
|
-
return
|
|
9821
|
+
return CreateHtmlBlock(opts);
|
|
9789
9822
|
};
|
|
9790
9823
|
|
|
9791
9824
|
/***/ }),
|
|
@@ -10155,38 +10188,38 @@ module.exports = TableOfContents;
|
|
|
10155
10188
|
"use strict";
|
|
10156
10189
|
__webpack_require__.r(__webpack_exports__);
|
|
10157
10190
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10158
|
-
/* harmony export */ "Anchor": () => (/* reexport default from dynamic */
|
|
10159
|
-
/* harmony export */ "Callout": () => (/* reexport default from dynamic */
|
|
10160
|
-
/* harmony export */ "Code": () => (/* reexport default from dynamic */
|
|
10161
|
-
/* harmony export */ "CodeTabs": () => (/* reexport default from dynamic */
|
|
10162
|
-
/* harmony export */ "Embed": () => (/* reexport default from dynamic */
|
|
10163
|
-
/* harmony export */ "GlossaryItem": () => (/* reexport default from dynamic */
|
|
10164
|
-
/* harmony export */ "HTMLBlock": () => (/* reexport default from dynamic */
|
|
10165
|
-
/* harmony export */ "Heading": () => (/* reexport default from dynamic */
|
|
10166
|
-
/* harmony export */ "Image": () => (/* reexport default from dynamic */
|
|
10167
|
-
/* harmony export */ "Table": () => (/* reexport default from dynamic */
|
|
10191
|
+
/* harmony export */ "Anchor": () => (/* reexport default from dynamic */ _Anchor__WEBPACK_IMPORTED_MODULE_0___default.a),
|
|
10192
|
+
/* harmony export */ "Callout": () => (/* reexport default from dynamic */ _Callout__WEBPACK_IMPORTED_MODULE_1___default.a),
|
|
10193
|
+
/* harmony export */ "Code": () => (/* reexport default from dynamic */ _Code__WEBPACK_IMPORTED_MODULE_2___default.a),
|
|
10194
|
+
/* harmony export */ "CodeTabs": () => (/* reexport default from dynamic */ _CodeTabs__WEBPACK_IMPORTED_MODULE_3___default.a),
|
|
10195
|
+
/* harmony export */ "Embed": () => (/* reexport default from dynamic */ _Embed__WEBPACK_IMPORTED_MODULE_4___default.a),
|
|
10196
|
+
/* harmony export */ "GlossaryItem": () => (/* reexport default from dynamic */ _GlossaryItem__WEBPACK_IMPORTED_MODULE_5___default.a),
|
|
10197
|
+
/* harmony export */ "HTMLBlock": () => (/* reexport default from dynamic */ _HTMLBlock__WEBPACK_IMPORTED_MODULE_6___default.a),
|
|
10198
|
+
/* harmony export */ "Heading": () => (/* reexport default from dynamic */ _Heading__WEBPACK_IMPORTED_MODULE_7___default.a),
|
|
10199
|
+
/* harmony export */ "Image": () => (/* reexport default from dynamic */ _Image__WEBPACK_IMPORTED_MODULE_8___default.a),
|
|
10200
|
+
/* harmony export */ "Table": () => (/* reexport default from dynamic */ _Table__WEBPACK_IMPORTED_MODULE_9___default.a),
|
|
10168
10201
|
/* harmony export */ "TableOfContents": () => (/* reexport default from dynamic */ _TableOfContents__WEBPACK_IMPORTED_MODULE_10___default.a)
|
|
10169
10202
|
/* harmony export */ });
|
|
10170
|
-
/* harmony import */ var
|
|
10171
|
-
/* harmony import */ var
|
|
10172
|
-
/* harmony import */ var
|
|
10173
|
-
/* harmony import */ var
|
|
10174
|
-
/* harmony import */ var
|
|
10175
|
-
/* harmony import */ var
|
|
10176
|
-
/* harmony import */ var
|
|
10177
|
-
/* harmony import */ var
|
|
10178
|
-
/* harmony import */ var
|
|
10179
|
-
/* harmony import */ var
|
|
10180
|
-
/* harmony import */ var
|
|
10181
|
-
/* harmony import */ var
|
|
10182
|
-
/* harmony import */ var
|
|
10183
|
-
/* harmony import */ var
|
|
10184
|
-
/* harmony import */ var
|
|
10185
|
-
/* harmony import */ var
|
|
10186
|
-
/* harmony import */ var
|
|
10187
|
-
/* harmony import */ var
|
|
10188
|
-
/* harmony import */ var
|
|
10189
|
-
/* harmony import */ var
|
|
10203
|
+
/* harmony import */ var _Anchor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8447);
|
|
10204
|
+
/* harmony import */ var _Anchor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Anchor__WEBPACK_IMPORTED_MODULE_0__);
|
|
10205
|
+
/* harmony import */ var _Callout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2015);
|
|
10206
|
+
/* harmony import */ var _Callout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_Callout__WEBPACK_IMPORTED_MODULE_1__);
|
|
10207
|
+
/* harmony import */ var _Code__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8297);
|
|
10208
|
+
/* harmony import */ var _Code__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_Code__WEBPACK_IMPORTED_MODULE_2__);
|
|
10209
|
+
/* harmony import */ var _CodeTabs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6553);
|
|
10210
|
+
/* harmony import */ var _CodeTabs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_CodeTabs__WEBPACK_IMPORTED_MODULE_3__);
|
|
10211
|
+
/* harmony import */ var _Embed__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1053);
|
|
10212
|
+
/* harmony import */ var _Embed__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_Embed__WEBPACK_IMPORTED_MODULE_4__);
|
|
10213
|
+
/* harmony import */ var _GlossaryItem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6566);
|
|
10214
|
+
/* harmony import */ var _GlossaryItem__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_GlossaryItem__WEBPACK_IMPORTED_MODULE_5__);
|
|
10215
|
+
/* harmony import */ var _HTMLBlock__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(822);
|
|
10216
|
+
/* harmony import */ var _HTMLBlock__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_HTMLBlock__WEBPACK_IMPORTED_MODULE_6__);
|
|
10217
|
+
/* harmony import */ var _Heading__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1984);
|
|
10218
|
+
/* harmony import */ var _Heading__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_Heading__WEBPACK_IMPORTED_MODULE_7__);
|
|
10219
|
+
/* harmony import */ var _Image__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9167);
|
|
10220
|
+
/* harmony import */ var _Image__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_Image__WEBPACK_IMPORTED_MODULE_8__);
|
|
10221
|
+
/* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(484);
|
|
10222
|
+
/* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_Table__WEBPACK_IMPORTED_MODULE_9__);
|
|
10190
10223
|
/* harmony import */ var _TableOfContents__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4479);
|
|
10191
10224
|
/* harmony import */ var _TableOfContents__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_TableOfContents__WEBPACK_IMPORTED_MODULE_10__);
|
|
10192
10225
|
|
|
@@ -10701,6 +10734,7 @@ var options = {
|
|
|
10701
10734
|
setext: true
|
|
10702
10735
|
},
|
|
10703
10736
|
normalize: true,
|
|
10737
|
+
safeMode: false,
|
|
10704
10738
|
settings: {
|
|
10705
10739
|
position: false
|
|
10706
10740
|
},
|
|
@@ -11649,18 +11683,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
11649
11683
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11650
11684
|
|
|
11651
11685
|
/* eslint-disable consistent-return */
|
|
11652
|
-
var unified = __webpack_require__(8835);
|
|
11653
|
-
|
|
11654
|
-
var rehypeParse = __webpack_require__(3322);
|
|
11655
|
-
|
|
11656
|
-
var rehypeSanitize = __webpack_require__(1667);
|
|
11657
|
-
|
|
11658
|
-
var rehypeStringify = __webpack_require__(7532);
|
|
11659
|
-
|
|
11660
|
-
var globalSanitizeSchema = __webpack_require__(8229);
|
|
11661
|
-
|
|
11662
11686
|
var RGXP = /^\[block:(.*)\]([^]+?)\[\/block\]/;
|
|
11663
11687
|
var compatibilityMode;
|
|
11688
|
+
var safeMode;
|
|
11664
11689
|
|
|
11665
11690
|
var WrapPinnedBlocks = function WrapPinnedBlocks(node, json) {
|
|
11666
11691
|
if (!json.sidebar) return node;
|
|
@@ -11689,13 +11714,6 @@ var imgSizeByWidth = new Proxy(new Map(Array.from(imgSizeValues).reverse()), {
|
|
|
11689
11714
|
return match ? match[1] : width in sizes ? sizes[width] : width;
|
|
11690
11715
|
}
|
|
11691
11716
|
});
|
|
11692
|
-
var processor = unified().use(rehypeParse, {
|
|
11693
|
-
fragment: true
|
|
11694
|
-
}).use(rehypeSanitize, globalSanitizeSchema).use(rehypeStringify);
|
|
11695
|
-
|
|
11696
|
-
var sanitize = function sanitize(html) {
|
|
11697
|
-
return processor.processSync(html).toString();
|
|
11698
|
-
};
|
|
11699
11717
|
|
|
11700
11718
|
function tokenize(eat, value) {
|
|
11701
11719
|
var _this = this;
|
|
@@ -11943,8 +11961,9 @@ function tokenize(eat, value) {
|
|
|
11943
11961
|
data: {
|
|
11944
11962
|
hName: 'html-block',
|
|
11945
11963
|
hProperties: {
|
|
11946
|
-
html:
|
|
11947
|
-
runScripts: compatibilityMode
|
|
11964
|
+
html: json.html,
|
|
11965
|
+
runScripts: compatibilityMode,
|
|
11966
|
+
safeMode: safeMode
|
|
11948
11967
|
}
|
|
11949
11968
|
}
|
|
11950
11969
|
}, json));
|
|
@@ -11969,6 +11988,7 @@ function parser() {
|
|
|
11969
11988
|
var tokenizers = Parser.prototype.blockTokenizers;
|
|
11970
11989
|
var methods = Parser.prototype.blockMethods;
|
|
11971
11990
|
if (this.data('compatibilityMode')) compatibilityMode = true;
|
|
11991
|
+
if (this.data('safeMode')) safeMode = true;
|
|
11972
11992
|
tokenizers.magicBlocks = tokenize;
|
|
11973
11993
|
methods.splice(methods.indexOf('newline'), 0, 'magicBlocks');
|
|
11974
11994
|
}
|
|
@@ -14156,136 +14176,56 @@ function ok() {
|
|
|
14156
14176
|
}
|
|
14157
14177
|
|
|
14158
14178
|
|
|
14159
|
-
/***/ }),
|
|
14160
|
-
|
|
14161
|
-
/***/ 3216:
|
|
14162
|
-
/***/ ((module) => {
|
|
14163
|
-
|
|
14164
|
-
"use strict";
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
module.exports = convert
|
|
14168
|
-
|
|
14169
|
-
function convert(test) {
|
|
14170
|
-
if (typeof test === 'string') {
|
|
14171
|
-
return tagNameFactory(test)
|
|
14172
|
-
}
|
|
14173
|
-
|
|
14174
|
-
if (test === null || test === undefined) {
|
|
14175
|
-
return element
|
|
14176
|
-
}
|
|
14177
|
-
|
|
14178
|
-
if (typeof test === 'object') {
|
|
14179
|
-
return any(test)
|
|
14180
|
-
}
|
|
14181
|
-
|
|
14182
|
-
if (typeof test === 'function') {
|
|
14183
|
-
return callFactory(test)
|
|
14184
|
-
}
|
|
14185
|
-
|
|
14186
|
-
throw new Error('Expected function, string, or array as test')
|
|
14187
|
-
}
|
|
14188
|
-
|
|
14189
|
-
function convertAll(tests) {
|
|
14190
|
-
var length = tests.length
|
|
14191
|
-
var index = -1
|
|
14192
|
-
var results = []
|
|
14193
|
-
|
|
14194
|
-
while (++index < length) {
|
|
14195
|
-
results[index] = convert(tests[index])
|
|
14196
|
-
}
|
|
14197
|
-
|
|
14198
|
-
return results
|
|
14199
|
-
}
|
|
14200
|
-
|
|
14201
|
-
function any(tests) {
|
|
14202
|
-
var checks = convertAll(tests)
|
|
14203
|
-
var length = checks.length
|
|
14204
|
-
|
|
14205
|
-
return matches
|
|
14206
|
-
|
|
14207
|
-
function matches() {
|
|
14208
|
-
var index = -1
|
|
14209
|
-
|
|
14210
|
-
while (++index < length) {
|
|
14211
|
-
if (checks[index].apply(this, arguments)) {
|
|
14212
|
-
return true
|
|
14213
|
-
}
|
|
14214
|
-
}
|
|
14215
|
-
|
|
14216
|
-
return false
|
|
14217
|
-
}
|
|
14218
|
-
}
|
|
14219
|
-
|
|
14220
|
-
// Utility to convert a string a tag name check.
|
|
14221
|
-
function tagNameFactory(test) {
|
|
14222
|
-
return tagName
|
|
14223
|
-
|
|
14224
|
-
function tagName(node) {
|
|
14225
|
-
return element(node) && node.tagName === test
|
|
14226
|
-
}
|
|
14227
|
-
}
|
|
14228
|
-
|
|
14229
|
-
// Utility to convert a function check.
|
|
14230
|
-
function callFactory(test) {
|
|
14231
|
-
return call
|
|
14232
|
-
|
|
14233
|
-
function call(node) {
|
|
14234
|
-
return element(node) && Boolean(test.apply(this, arguments))
|
|
14235
|
-
}
|
|
14236
|
-
}
|
|
14237
|
-
|
|
14238
|
-
// Utility to return true if this is an element.
|
|
14239
|
-
function element(node) {
|
|
14240
|
-
return (
|
|
14241
|
-
node &&
|
|
14242
|
-
typeof node === 'object' &&
|
|
14243
|
-
node.type === 'element' &&
|
|
14244
|
-
typeof node.tagName === 'string'
|
|
14245
|
-
)
|
|
14246
|
-
}
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
14179
|
/***/ }),
|
|
14250
14180
|
|
|
14251
14181
|
/***/ 8909:
|
|
14252
|
-
/***/ ((module
|
|
14182
|
+
/***/ ((module) => {
|
|
14253
14183
|
|
|
14254
14184
|
"use strict";
|
|
14255
14185
|
|
|
14256
14186
|
|
|
14257
|
-
var convert = __webpack_require__(3216)
|
|
14258
|
-
|
|
14259
14187
|
module.exports = isElement
|
|
14260
14188
|
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
var hasParent = parent !== null && parent !== undefined
|
|
14266
|
-
var hasIndex = index !== null && index !== undefined
|
|
14267
|
-
var check = convert(test)
|
|
14189
|
+
// Check if if `node` is an `element` and, if `tagNames` is given, `node`
|
|
14190
|
+
// matches them `tagNames`.
|
|
14191
|
+
function isElement(node, tagNames) {
|
|
14192
|
+
var name
|
|
14268
14193
|
|
|
14269
14194
|
if (
|
|
14270
|
-
|
|
14271
|
-
|
|
14195
|
+
!(
|
|
14196
|
+
tagNames === null ||
|
|
14197
|
+
tagNames === undefined ||
|
|
14198
|
+
typeof tagNames === 'string' ||
|
|
14199
|
+
(typeof tagNames === 'object' && tagNames.length !== 0)
|
|
14200
|
+
)
|
|
14272
14201
|
) {
|
|
14273
|
-
throw new Error(
|
|
14202
|
+
throw new Error(
|
|
14203
|
+
'Expected `string` or `Array.<string>` for `tagNames`, not `' +
|
|
14204
|
+
tagNames +
|
|
14205
|
+
'`'
|
|
14206
|
+
)
|
|
14274
14207
|
}
|
|
14275
14208
|
|
|
14276
|
-
if (
|
|
14277
|
-
|
|
14209
|
+
if (
|
|
14210
|
+
!node ||
|
|
14211
|
+
typeof node !== 'object' ||
|
|
14212
|
+
node.type !== 'element' ||
|
|
14213
|
+
typeof node.tagName !== 'string'
|
|
14214
|
+
) {
|
|
14215
|
+
return false
|
|
14278
14216
|
}
|
|
14279
14217
|
|
|
14280
|
-
if (
|
|
14281
|
-
return
|
|
14218
|
+
if (tagNames === null || tagNames === undefined) {
|
|
14219
|
+
return true
|
|
14282
14220
|
}
|
|
14283
14221
|
|
|
14284
|
-
|
|
14285
|
-
|
|
14222
|
+
name = node.tagName
|
|
14223
|
+
|
|
14224
|
+
if (typeof tagNames === 'string') {
|
|
14225
|
+
return name === tagNames
|
|
14286
14226
|
}
|
|
14287
14227
|
|
|
14288
|
-
return
|
|
14228
|
+
return tagNames.indexOf(name) !== -1
|
|
14289
14229
|
}
|
|
14290
14230
|
|
|
14291
14231
|
|
|
@@ -21185,104 +21125,6 @@ var svg = __webpack_require__(5789)
|
|
|
21185
21125
|
module.exports = merge([xml, xlink, xmlns, aria, svg])
|
|
21186
21126
|
|
|
21187
21127
|
|
|
21188
|
-
/***/ }),
|
|
21189
|
-
|
|
21190
|
-
/***/ 3322:
|
|
21191
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
21192
|
-
|
|
21193
|
-
"use strict";
|
|
21194
|
-
|
|
21195
|
-
|
|
21196
|
-
var fromParse5 = __webpack_require__(7721)
|
|
21197
|
-
var Parser5 = __webpack_require__(6425)
|
|
21198
|
-
var errors = __webpack_require__(2471)
|
|
21199
|
-
|
|
21200
|
-
var base = 'https://html.spec.whatwg.org/multipage/parsing.html#parse-error-'
|
|
21201
|
-
|
|
21202
|
-
var fatalities = {2: true, 1: false, 0: null}
|
|
21203
|
-
|
|
21204
|
-
module.exports = parse
|
|
21205
|
-
|
|
21206
|
-
function parse(options) {
|
|
21207
|
-
var settings = Object.assign({}, options, this.data('settings'))
|
|
21208
|
-
var position = settings.position
|
|
21209
|
-
|
|
21210
|
-
position = typeof position === 'boolean' ? position : true
|
|
21211
|
-
|
|
21212
|
-
this.Parser = parser
|
|
21213
|
-
|
|
21214
|
-
function parser(doc, file) {
|
|
21215
|
-
var fn = settings.fragment ? 'parseFragment' : 'parse'
|
|
21216
|
-
var onParseError = settings.emitParseErrors ? onerror : null
|
|
21217
|
-
var parse5 = new Parser5({
|
|
21218
|
-
sourceCodeLocationInfo: position,
|
|
21219
|
-
onParseError: onParseError,
|
|
21220
|
-
scriptingEnabled: false
|
|
21221
|
-
})
|
|
21222
|
-
|
|
21223
|
-
return fromParse5(parse5[fn](doc), {
|
|
21224
|
-
space: settings.space,
|
|
21225
|
-
file: file,
|
|
21226
|
-
verbose: settings.verbose
|
|
21227
|
-
})
|
|
21228
|
-
|
|
21229
|
-
function onerror(err) {
|
|
21230
|
-
var code = err.code
|
|
21231
|
-
var name = camelcase(code)
|
|
21232
|
-
var setting = settings[name]
|
|
21233
|
-
var config = setting === undefined || setting === null ? true : setting
|
|
21234
|
-
var level = typeof config === 'number' ? config : config ? 1 : 0
|
|
21235
|
-
var start = {
|
|
21236
|
-
line: err.startLine,
|
|
21237
|
-
column: err.startCol,
|
|
21238
|
-
offset: err.startOffset
|
|
21239
|
-
}
|
|
21240
|
-
var end = {line: err.endLine, column: err.endCol, offset: err.endOffset}
|
|
21241
|
-
var info
|
|
21242
|
-
var message
|
|
21243
|
-
|
|
21244
|
-
if (level) {
|
|
21245
|
-
info = errors[name] || /* istanbul ignore next */ {
|
|
21246
|
-
reason: '',
|
|
21247
|
-
description: ''
|
|
21248
|
-
}
|
|
21249
|
-
|
|
21250
|
-
message = file.message(format(info.reason), {start: start, end: end})
|
|
21251
|
-
message.source = 'parse-error'
|
|
21252
|
-
message.ruleId = code
|
|
21253
|
-
message.fatal = fatalities[level]
|
|
21254
|
-
message.note = format(info.description)
|
|
21255
|
-
message.url = info.url === false ? null : base + code
|
|
21256
|
-
}
|
|
21257
|
-
|
|
21258
|
-
function format(value) {
|
|
21259
|
-
return value.replace(/%c(?:-(\d+))?/g, char).replace(/%x/g, encodedChar)
|
|
21260
|
-
}
|
|
21261
|
-
|
|
21262
|
-
function char($0, $1) {
|
|
21263
|
-
var offset = $1 ? -parseInt($1, 10) : 0
|
|
21264
|
-
var char = doc.charAt(err.startOffset + offset)
|
|
21265
|
-
return char === '`' ? '` ` `' : char
|
|
21266
|
-
}
|
|
21267
|
-
|
|
21268
|
-
function encodedChar() {
|
|
21269
|
-
var char = doc.charCodeAt(err.startOffset).toString(16).toUpperCase()
|
|
21270
|
-
|
|
21271
|
-
return '0x' + char
|
|
21272
|
-
}
|
|
21273
|
-
}
|
|
21274
|
-
}
|
|
21275
|
-
}
|
|
21276
|
-
|
|
21277
|
-
function camelcase(value) {
|
|
21278
|
-
return value.replace(/-[a-z]/g, replacer)
|
|
21279
|
-
}
|
|
21280
|
-
|
|
21281
|
-
function replacer($0) {
|
|
21282
|
-
return $0.charAt(1).toUpperCase()
|
|
21283
|
-
}
|
|
21284
|
-
|
|
21285
|
-
|
|
21286
21128
|
/***/ }),
|
|
21287
21129
|
|
|
21288
21130
|
/***/ 6388:
|
|
@@ -34223,14 +34065,6 @@ module.exports = JSON.parse('{"classId":"classID","dataType":"datatype","itemId"
|
|
|
34223
34065
|
|
|
34224
34066
|
/***/ }),
|
|
34225
34067
|
|
|
34226
|
-
/***/ 2471:
|
|
34227
|
-
/***/ ((module) => {
|
|
34228
|
-
|
|
34229
|
-
"use strict";
|
|
34230
|
-
module.exports = JSON.parse('{"abandonedHeadElementChild":{"reason":"Unexpected metadata element after head","description":"Unexpected element after head. Expected the element before `</head>`","url":false},"abruptClosingOfEmptyComment":{"reason":"Unexpected abruptly closed empty comment","description":"Unexpected `>` or `->`. Expected `-->` to close comments"},"abruptDoctypePublicIdentifier":{"reason":"Unexpected abruptly closed public identifier","description":"Unexpected `>`. Expected a closing `\\"` or `\'` after the public identifier"},"abruptDoctypeSystemIdentifier":{"reason":"Unexpected abruptly closed system identifier","description":"Unexpected `>`. Expected a closing `\\"` or `\'` after the identifier identifier"},"absenceOfDigitsInNumericCharacterReference":{"reason":"Unexpected non-digit at start of numeric character reference","description":"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},"cdataInHtmlContent":{"reason":"Unexpected CDATA section in HTML","description":"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},"characterReferenceOutsideUnicodeRange":{"reason":"Unexpected too big numeric character reference","description":"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},"closingOfElementWithOpenChildElements":{"reason":"Unexpected closing tag with open child elements","description":"Unexpectedly closing tag. Expected other tags to be closed first","url":false},"controlCharacterInInputStream":{"reason":"Unexpected control character","description":"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},"controlCharacterReference":{"reason":"Unexpected control character reference","description":"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},"disallowedContentInNoscriptInHead":{"reason":"Disallowed content inside `<noscript>` in `<head>`","description":"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`","url":false},"duplicateAttribute":{"reason":"Unexpected duplicate attribute","description":"Unexpectedly double attribute. Expected attributes to occur only once"},"endTagWithAttributes":{"reason":"Unexpected attribute on closing tag","description":"Unexpected attribute. Expected `>` instead"},"endTagWithTrailingSolidus":{"reason":"Unexpected slash at end of closing tag","description":"Unexpected `%c-1`. Expected `>` instead"},"endTagWithoutMatchingOpenElement":{"reason":"Unexpected unopened end tag","description":"Unexpected end tag. Expected no end tag or another end tag","url":false},"eofBeforeTagName":{"reason":"Unexpected end of file","description":"Unexpected end of file. Expected tag name instead"},"eofInCdata":{"reason":"Unexpected end of file in CDATA","description":"Unexpected end of file. Expected `]]>` to close the CDATA"},"eofInComment":{"reason":"Unexpected end of file in comment","description":"Unexpected end of file. Expected `-->` to close the comment"},"eofInDoctype":{"reason":"Unexpected end of file in doctype","description":"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},"eofInElementThatCanContainOnlyText":{"reason":"Unexpected end of file in element that can only contain text","description":"Unexpected end of file. Expected text or a closing tag","url":false},"eofInScriptHtmlCommentLikeText":{"reason":"Unexpected end of file in comment inside script","description":"Unexpected end of file. Expected `-->` to close the comment"},"eofInTag":{"reason":"Unexpected end of file in tag","description":"Unexpected end of file. Expected `>` to close the tag"},"incorrectlyClosedComment":{"reason":"Incorrectly closed comment","description":"Unexpected `%c-1`. Expected `-->` to close the comment"},"incorrectlyOpenedComment":{"reason":"Incorrectly opened comment","description":"Unexpected `%c`. Expected `<!--` to open the comment"},"invalidCharacterSequenceAfterDoctypeName":{"reason":"Invalid sequence after doctype name","description":"Unexpected sequence at `%c`. Expected `public` or `system`"},"invalidFirstCharacterOfTagName":{"reason":"Invalid first character in tag name","description":"Unexpected `%c`. Expected an ASCII letter instead"},"misplacedDoctype":{"reason":"Misplaced doctype","description":"Unexpected doctype. Expected doctype before head","url":false},"misplacedStartTagForHeadElement":{"reason":"Misplaced `<head>` start tag","description":"Unexpected start tag `<head>`. Expected `<head>` directly after doctype","url":false},"missingAttributeValue":{"reason":"Missing attribute value","description":"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},"missingDoctype":{"reason":"Missing doctype before other content","description":"Expected a `<!doctype html>` before anything else","url":false},"missingDoctypeName":{"reason":"Missing doctype name","description":"Unexpected doctype end at `%c`. Expected `html` instead"},"missingDoctypePublicIdentifier":{"reason":"Missing public identifier in doctype","description":"Unexpected `%c`. Expected identifier for `public` instead"},"missingDoctypeSystemIdentifier":{"reason":"Missing system identifier in doctype","description":"Unexpected `%c`. Expected identifier for `system` instead (suggested: `\\"about:legacy-compat\\"`)"},"missingEndTagName":{"reason":"Missing name in end tag","description":"Unexpected `%c`. Expected an ASCII letter instead"},"missingQuoteBeforeDoctypePublicIdentifier":{"reason":"Missing quote before public identifier in doctype","description":"Unexpected `%c`. Expected `\\"` or `\'` instead"},"missingQuoteBeforeDoctypeSystemIdentifier":{"reason":"Missing quote before system identifier in doctype","description":"Unexpected `%c`. Expected `\\"` or `\'` instead"},"missingSemicolonAfterCharacterReference":{"reason":"Missing semicolon after character reference","description":"Unexpected `%c`. Expected `;` instead"},"missingWhitespaceAfterDoctypePublicKeyword":{"reason":"Missing whitespace after public identifier in doctype","description":"Unexpected `%c`. Expected ASCII whitespace instead"},"missingWhitespaceAfterDoctypeSystemKeyword":{"reason":"Missing whitespace after system identifier in doctype","description":"Unexpected `%c`. Expected ASCII whitespace instead"},"missingWhitespaceBeforeDoctypeName":{"reason":"Missing whitespace before doctype name","description":"Unexpected `%c`. Expected ASCII whitespace instead"},"missingWhitespaceBetweenAttributes":{"reason":"Missing whitespace between attributes","description":"Unexpected `%c`. Expected ASCII whitespace instead"},"missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers":{"reason":"Missing whitespace between public and system identifiers in doctype","description":"Unexpected `%c`. Expected ASCII whitespace instead"},"nestedComment":{"reason":"Unexpected nested comment","description":"Unexpected `<!--`. Expected `-->`"},"nestedNoscriptInHead":{"reason":"Unexpected nested `<noscript>` in `<head>`","description":"Unexpected `<noscript>`. Expected a closing tag or a meta element","url":false},"nonConformingDoctype":{"reason":"Unexpected non-conforming doctype declaration","description":"Expected `<!doctype html>` or `<!doctype html system \\"about:legacy-compat\\">`","url":false},"nonVoidHtmlElementStartTagWithTrailingSolidus":{"reason":"Unexpected trailing slash on start tag of non-void element","description":"Unexpected `/`. Expected `>` instead"},"noncharacterCharacterReference":{"reason":"Unexpected noncharacter code point referenced by character reference","description":"Unexpected code point. Do not use noncharacters in HTML"},"noncharacterInInputStream":{"reason":"Unexpected noncharacter character","description":"Unexpected code point `%x`. Do not use noncharacters in HTML"},"nullCharacterReference":{"reason":"Unexpected NULL character referenced by character reference","description":"Unexpected code point. Do not use NULL characters in HTML"},"openElementsLeftAfterEof":{"reason":"Unexpected end of file","description":"Unexpected end of file. Expected closing tag instead","url":false},"surrogateCharacterReference":{"reason":"Unexpected surrogate character referenced by character reference","description":"Unexpected code point. Do not use lone surrogate characters in HTML"},"surrogateInInputStream":{"reason":"Unexpected surrogate character","description":"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},"unexpectedCharacterAfterDoctypeSystemIdentifier":{"reason":"Invalid character after system identifier in doctype","description":"Unexpected character at `%c`. Expected `>`"},"unexpectedCharacterInAttributeName":{"reason":"Unexpected character in attribute name","description":"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},"unexpectedCharacterInUnquotedAttributeValue":{"reason":"Unexpected character in unquoted attribute value","description":"Unexpected `%c`. Quote the attribute value to include it"},"unexpectedEqualsSignBeforeAttributeName":{"reason":"Unexpected equals sign before attribute name ","description":"Unexpected `%c`. Add an attribute name before it"},"unexpectedNullCharacter":{"reason":"Unexpected NULL character","description":"Unexpected code point `%x`. Do not use NULL characters in HTML"},"unexpectedQuestionMarkInsteadOfTagName":{"reason":"Unexpected question mark instead of tag name","description":"Unexpected `%c`. Expected an ASCII letter instead"},"unexpectedSolidusInTag":{"reason":"Unexpected slash in tag","description":"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},"unknownNamedCharacterReference":{"reason":"Unexpected unknown named character reference","description":"Unexpected character reference. Expected known named character references"}}');
|
|
34231
|
-
|
|
34232
|
-
/***/ }),
|
|
34233
|
-
|
|
34234
34068
|
/***/ 9052:
|
|
34235
34069
|
/***/ ((module) => {
|
|
34236
34070
|
|
|
@@ -34550,7 +34384,7 @@ function reactProcessor() {
|
|
|
34550
34384
|
Fragment: React.Fragment,
|
|
34551
34385
|
components: _objectSpread({
|
|
34552
34386
|
'code-tabs': CodeTabs(sanitize, opts),
|
|
34553
|
-
'html-block': HTMLBlock(sanitize),
|
|
34387
|
+
'html-block': HTMLBlock(sanitize, opts),
|
|
34554
34388
|
'rdme-callout': Callout(sanitize),
|
|
34555
34389
|
'readme-variable': Variable,
|
|
34556
34390
|
'readme-glossary-item': GlossaryItem,
|
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.43.1",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"browser": "dist/main.js",
|
|
8
8
|
"files": [
|
|
@@ -37,10 +37,8 @@
|
|
|
37
37
|
"path-browserify": "^1.0.1",
|
|
38
38
|
"process": "^0.11.10",
|
|
39
39
|
"prop-types": "^15.8.1",
|
|
40
|
-
"rehype-parse": "^7.0.1",
|
|
41
40
|
"rehype-raw": "^5.1.0",
|
|
42
41
|
"rehype-react": "^6.2.1",
|
|
43
|
-
"rehype-remark": "^7.0.0",
|
|
44
42
|
"rehype-sanitize": "^4.0.0",
|
|
45
43
|
"rehype-stringify": "^6.0.0",
|
|
46
44
|
"remark-breaks": "^1.0.0",
|
|
@@ -89,7 +87,7 @@
|
|
|
89
87
|
"identity-obj-proxy": "^3.0.0",
|
|
90
88
|
"jest": "^28.1.0",
|
|
91
89
|
"jest-environment-jsdom": "^28.1.0",
|
|
92
|
-
"jest-image-snapshot": "^
|
|
90
|
+
"jest-image-snapshot": "^5.1.0",
|
|
93
91
|
"jest-puppeteer": "^6.1.0",
|
|
94
92
|
"mini-css-extract-plugin": "^2.6.0",
|
|
95
93
|
"node-sass": "^7.0.1",
|
package/styles/components.scss
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
@import '../components/Image/style.scss';
|
|
2
|
-
|
|
3
2
|
@import '../components/Table/style.scss';
|
|
4
|
-
|
|
5
3
|
@import '../components/TableOfContents/style.scss';
|
|
6
|
-
|
|
7
4
|
@import '../components/Code/style.scss';
|
|
8
|
-
|
|
9
5
|
@import '../components/CodeTabs/style.scss';
|
|
10
|
-
|
|
11
6
|
@import '../components/Callout/style.scss';
|
|
12
|
-
|
|
13
7
|
@import '../components/Heading/style.scss';
|
|
14
|
-
|
|
8
|
+
@import '../components/HTMLBlock/style.scss';
|
|
15
9
|
@import '../components/Embed/style.scss';
|