@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.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
|
|
|
@@ -27879,6 +27912,7 @@ var options = {
|
|
|
27879
27912
|
setext: true
|
|
27880
27913
|
},
|
|
27881
27914
|
normalize: true,
|
|
27915
|
+
safeMode: false,
|
|
27882
27916
|
settings: {
|
|
27883
27917
|
position: false
|
|
27884
27918
|
},
|
|
@@ -28827,18 +28861,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
28827
28861
|
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; }
|
|
28828
28862
|
|
|
28829
28863
|
/* eslint-disable consistent-return */
|
|
28830
|
-
var unified = __webpack_require__(8835);
|
|
28831
|
-
|
|
28832
|
-
var rehypeParse = __webpack_require__(3322);
|
|
28833
|
-
|
|
28834
|
-
var rehypeSanitize = __webpack_require__(1667);
|
|
28835
|
-
|
|
28836
|
-
var rehypeStringify = __webpack_require__(7532);
|
|
28837
|
-
|
|
28838
|
-
var globalSanitizeSchema = __webpack_require__(8229);
|
|
28839
|
-
|
|
28840
28864
|
var RGXP = /^\[block:(.*)\]([^]+?)\[\/block\]/;
|
|
28841
28865
|
var compatibilityMode;
|
|
28866
|
+
var safeMode;
|
|
28842
28867
|
|
|
28843
28868
|
var WrapPinnedBlocks = function WrapPinnedBlocks(node, json) {
|
|
28844
28869
|
if (!json.sidebar) return node;
|
|
@@ -28867,13 +28892,6 @@ var imgSizeByWidth = new Proxy(new Map(Array.from(imgSizeValues).reverse()), {
|
|
|
28867
28892
|
return match ? match[1] : width in sizes ? sizes[width] : width;
|
|
28868
28893
|
}
|
|
28869
28894
|
});
|
|
28870
|
-
var processor = unified().use(rehypeParse, {
|
|
28871
|
-
fragment: true
|
|
28872
|
-
}).use(rehypeSanitize, globalSanitizeSchema).use(rehypeStringify);
|
|
28873
|
-
|
|
28874
|
-
var sanitize = function sanitize(html) {
|
|
28875
|
-
return processor.processSync(html).toString();
|
|
28876
|
-
};
|
|
28877
28895
|
|
|
28878
28896
|
function tokenize(eat, value) {
|
|
28879
28897
|
var _this = this;
|
|
@@ -29121,8 +29139,9 @@ function tokenize(eat, value) {
|
|
|
29121
29139
|
data: {
|
|
29122
29140
|
hName: 'html-block',
|
|
29123
29141
|
hProperties: {
|
|
29124
|
-
html:
|
|
29125
|
-
runScripts: compatibilityMode
|
|
29142
|
+
html: json.html,
|
|
29143
|
+
runScripts: compatibilityMode,
|
|
29144
|
+
safeMode: safeMode
|
|
29126
29145
|
}
|
|
29127
29146
|
}
|
|
29128
29147
|
}, json));
|
|
@@ -29147,6 +29166,7 @@ function parser() {
|
|
|
29147
29166
|
var tokenizers = Parser.prototype.blockTokenizers;
|
|
29148
29167
|
var methods = Parser.prototype.blockMethods;
|
|
29149
29168
|
if (this.data('compatibilityMode')) compatibilityMode = true;
|
|
29169
|
+
if (this.data('safeMode')) safeMode = true;
|
|
29150
29170
|
tokenizers.magicBlocks = tokenize;
|
|
29151
29171
|
methods.splice(methods.indexOf('newline'), 0, 'magicBlocks');
|
|
29152
29172
|
}
|
|
@@ -31334,136 +31354,56 @@ function ok() {
|
|
|
31334
31354
|
}
|
|
31335
31355
|
|
|
31336
31356
|
|
|
31337
|
-
/***/ }),
|
|
31338
|
-
|
|
31339
|
-
/***/ 3216:
|
|
31340
|
-
/***/ ((module) => {
|
|
31341
|
-
|
|
31342
|
-
"use strict";
|
|
31343
|
-
|
|
31344
|
-
|
|
31345
|
-
module.exports = convert
|
|
31346
|
-
|
|
31347
|
-
function convert(test) {
|
|
31348
|
-
if (typeof test === 'string') {
|
|
31349
|
-
return tagNameFactory(test)
|
|
31350
|
-
}
|
|
31351
|
-
|
|
31352
|
-
if (test === null || test === undefined) {
|
|
31353
|
-
return element
|
|
31354
|
-
}
|
|
31355
|
-
|
|
31356
|
-
if (typeof test === 'object') {
|
|
31357
|
-
return any(test)
|
|
31358
|
-
}
|
|
31359
|
-
|
|
31360
|
-
if (typeof test === 'function') {
|
|
31361
|
-
return callFactory(test)
|
|
31362
|
-
}
|
|
31363
|
-
|
|
31364
|
-
throw new Error('Expected function, string, or array as test')
|
|
31365
|
-
}
|
|
31366
|
-
|
|
31367
|
-
function convertAll(tests) {
|
|
31368
|
-
var length = tests.length
|
|
31369
|
-
var index = -1
|
|
31370
|
-
var results = []
|
|
31371
|
-
|
|
31372
|
-
while (++index < length) {
|
|
31373
|
-
results[index] = convert(tests[index])
|
|
31374
|
-
}
|
|
31375
|
-
|
|
31376
|
-
return results
|
|
31377
|
-
}
|
|
31378
|
-
|
|
31379
|
-
function any(tests) {
|
|
31380
|
-
var checks = convertAll(tests)
|
|
31381
|
-
var length = checks.length
|
|
31382
|
-
|
|
31383
|
-
return matches
|
|
31384
|
-
|
|
31385
|
-
function matches() {
|
|
31386
|
-
var index = -1
|
|
31387
|
-
|
|
31388
|
-
while (++index < length) {
|
|
31389
|
-
if (checks[index].apply(this, arguments)) {
|
|
31390
|
-
return true
|
|
31391
|
-
}
|
|
31392
|
-
}
|
|
31393
|
-
|
|
31394
|
-
return false
|
|
31395
|
-
}
|
|
31396
|
-
}
|
|
31397
|
-
|
|
31398
|
-
// Utility to convert a string a tag name check.
|
|
31399
|
-
function tagNameFactory(test) {
|
|
31400
|
-
return tagName
|
|
31401
|
-
|
|
31402
|
-
function tagName(node) {
|
|
31403
|
-
return element(node) && node.tagName === test
|
|
31404
|
-
}
|
|
31405
|
-
}
|
|
31406
|
-
|
|
31407
|
-
// Utility to convert a function check.
|
|
31408
|
-
function callFactory(test) {
|
|
31409
|
-
return call
|
|
31410
|
-
|
|
31411
|
-
function call(node) {
|
|
31412
|
-
return element(node) && Boolean(test.apply(this, arguments))
|
|
31413
|
-
}
|
|
31414
|
-
}
|
|
31415
|
-
|
|
31416
|
-
// Utility to return true if this is an element.
|
|
31417
|
-
function element(node) {
|
|
31418
|
-
return (
|
|
31419
|
-
node &&
|
|
31420
|
-
typeof node === 'object' &&
|
|
31421
|
-
node.type === 'element' &&
|
|
31422
|
-
typeof node.tagName === 'string'
|
|
31423
|
-
)
|
|
31424
|
-
}
|
|
31425
|
-
|
|
31426
|
-
|
|
31427
31357
|
/***/ }),
|
|
31428
31358
|
|
|
31429
31359
|
/***/ 8909:
|
|
31430
|
-
/***/ ((module
|
|
31360
|
+
/***/ ((module) => {
|
|
31431
31361
|
|
|
31432
31362
|
"use strict";
|
|
31433
31363
|
|
|
31434
31364
|
|
|
31435
|
-
var convert = __webpack_require__(3216)
|
|
31436
|
-
|
|
31437
31365
|
module.exports = isElement
|
|
31438
31366
|
|
|
31439
|
-
|
|
31440
|
-
|
|
31441
|
-
|
|
31442
|
-
|
|
31443
|
-
var hasParent = parent !== null && parent !== undefined
|
|
31444
|
-
var hasIndex = index !== null && index !== undefined
|
|
31445
|
-
var check = convert(test)
|
|
31367
|
+
// Check if if `node` is an `element` and, if `tagNames` is given, `node`
|
|
31368
|
+
// matches them `tagNames`.
|
|
31369
|
+
function isElement(node, tagNames) {
|
|
31370
|
+
var name
|
|
31446
31371
|
|
|
31447
31372
|
if (
|
|
31448
|
-
|
|
31449
|
-
|
|
31373
|
+
!(
|
|
31374
|
+
tagNames === null ||
|
|
31375
|
+
tagNames === undefined ||
|
|
31376
|
+
typeof tagNames === 'string' ||
|
|
31377
|
+
(typeof tagNames === 'object' && tagNames.length !== 0)
|
|
31378
|
+
)
|
|
31450
31379
|
) {
|
|
31451
|
-
throw new Error(
|
|
31380
|
+
throw new Error(
|
|
31381
|
+
'Expected `string` or `Array.<string>` for `tagNames`, not `' +
|
|
31382
|
+
tagNames +
|
|
31383
|
+
'`'
|
|
31384
|
+
)
|
|
31452
31385
|
}
|
|
31453
31386
|
|
|
31454
|
-
if (
|
|
31455
|
-
|
|
31387
|
+
if (
|
|
31388
|
+
!node ||
|
|
31389
|
+
typeof node !== 'object' ||
|
|
31390
|
+
node.type !== 'element' ||
|
|
31391
|
+
typeof node.tagName !== 'string'
|
|
31392
|
+
) {
|
|
31393
|
+
return false
|
|
31456
31394
|
}
|
|
31457
31395
|
|
|
31458
|
-
if (
|
|
31459
|
-
return
|
|
31396
|
+
if (tagNames === null || tagNames === undefined) {
|
|
31397
|
+
return true
|
|
31460
31398
|
}
|
|
31461
31399
|
|
|
31462
|
-
|
|
31463
|
-
|
|
31400
|
+
name = node.tagName
|
|
31401
|
+
|
|
31402
|
+
if (typeof tagNames === 'string') {
|
|
31403
|
+
return name === tagNames
|
|
31464
31404
|
}
|
|
31465
31405
|
|
|
31466
|
-
return
|
|
31406
|
+
return tagNames.indexOf(name) !== -1
|
|
31467
31407
|
}
|
|
31468
31408
|
|
|
31469
31409
|
|
|
@@ -38364,104 +38304,6 @@ var svg = __webpack_require__(5789)
|
|
|
38364
38304
|
module.exports = merge([xml, xlink, xmlns, aria, svg])
|
|
38365
38305
|
|
|
38366
38306
|
|
|
38367
|
-
/***/ }),
|
|
38368
|
-
|
|
38369
|
-
/***/ 3322:
|
|
38370
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
38371
|
-
|
|
38372
|
-
"use strict";
|
|
38373
|
-
|
|
38374
|
-
|
|
38375
|
-
var fromParse5 = __webpack_require__(7721)
|
|
38376
|
-
var Parser5 = __webpack_require__(6425)
|
|
38377
|
-
var errors = __webpack_require__(2471)
|
|
38378
|
-
|
|
38379
|
-
var base = 'https://html.spec.whatwg.org/multipage/parsing.html#parse-error-'
|
|
38380
|
-
|
|
38381
|
-
var fatalities = {2: true, 1: false, 0: null}
|
|
38382
|
-
|
|
38383
|
-
module.exports = parse
|
|
38384
|
-
|
|
38385
|
-
function parse(options) {
|
|
38386
|
-
var settings = Object.assign({}, options, this.data('settings'))
|
|
38387
|
-
var position = settings.position
|
|
38388
|
-
|
|
38389
|
-
position = typeof position === 'boolean' ? position : true
|
|
38390
|
-
|
|
38391
|
-
this.Parser = parser
|
|
38392
|
-
|
|
38393
|
-
function parser(doc, file) {
|
|
38394
|
-
var fn = settings.fragment ? 'parseFragment' : 'parse'
|
|
38395
|
-
var onParseError = settings.emitParseErrors ? onerror : null
|
|
38396
|
-
var parse5 = new Parser5({
|
|
38397
|
-
sourceCodeLocationInfo: position,
|
|
38398
|
-
onParseError: onParseError,
|
|
38399
|
-
scriptingEnabled: false
|
|
38400
|
-
})
|
|
38401
|
-
|
|
38402
|
-
return fromParse5(parse5[fn](doc), {
|
|
38403
|
-
space: settings.space,
|
|
38404
|
-
file: file,
|
|
38405
|
-
verbose: settings.verbose
|
|
38406
|
-
})
|
|
38407
|
-
|
|
38408
|
-
function onerror(err) {
|
|
38409
|
-
var code = err.code
|
|
38410
|
-
var name = camelcase(code)
|
|
38411
|
-
var setting = settings[name]
|
|
38412
|
-
var config = setting === undefined || setting === null ? true : setting
|
|
38413
|
-
var level = typeof config === 'number' ? config : config ? 1 : 0
|
|
38414
|
-
var start = {
|
|
38415
|
-
line: err.startLine,
|
|
38416
|
-
column: err.startCol,
|
|
38417
|
-
offset: err.startOffset
|
|
38418
|
-
}
|
|
38419
|
-
var end = {line: err.endLine, column: err.endCol, offset: err.endOffset}
|
|
38420
|
-
var info
|
|
38421
|
-
var message
|
|
38422
|
-
|
|
38423
|
-
if (level) {
|
|
38424
|
-
info = errors[name] || /* istanbul ignore next */ {
|
|
38425
|
-
reason: '',
|
|
38426
|
-
description: ''
|
|
38427
|
-
}
|
|
38428
|
-
|
|
38429
|
-
message = file.message(format(info.reason), {start: start, end: end})
|
|
38430
|
-
message.source = 'parse-error'
|
|
38431
|
-
message.ruleId = code
|
|
38432
|
-
message.fatal = fatalities[level]
|
|
38433
|
-
message.note = format(info.description)
|
|
38434
|
-
message.url = info.url === false ? null : base + code
|
|
38435
|
-
}
|
|
38436
|
-
|
|
38437
|
-
function format(value) {
|
|
38438
|
-
return value.replace(/%c(?:-(\d+))?/g, char).replace(/%x/g, encodedChar)
|
|
38439
|
-
}
|
|
38440
|
-
|
|
38441
|
-
function char($0, $1) {
|
|
38442
|
-
var offset = $1 ? -parseInt($1, 10) : 0
|
|
38443
|
-
var char = doc.charAt(err.startOffset + offset)
|
|
38444
|
-
return char === '`' ? '` ` `' : char
|
|
38445
|
-
}
|
|
38446
|
-
|
|
38447
|
-
function encodedChar() {
|
|
38448
|
-
var char = doc.charCodeAt(err.startOffset).toString(16).toUpperCase()
|
|
38449
|
-
|
|
38450
|
-
return '0x' + char
|
|
38451
|
-
}
|
|
38452
|
-
}
|
|
38453
|
-
}
|
|
38454
|
-
}
|
|
38455
|
-
|
|
38456
|
-
function camelcase(value) {
|
|
38457
|
-
return value.replace(/-[a-z]/g, replacer)
|
|
38458
|
-
}
|
|
38459
|
-
|
|
38460
|
-
function replacer($0) {
|
|
38461
|
-
return $0.charAt(1).toUpperCase()
|
|
38462
|
-
}
|
|
38463
|
-
|
|
38464
|
-
|
|
38465
38307
|
/***/ }),
|
|
38466
38308
|
|
|
38467
38309
|
/***/ 6388:
|
|
@@ -51797,14 +51639,6 @@ module.exports = JSON.parse('{"classId":"classID","dataType":"datatype","itemId"
|
|
|
51797
51639
|
|
|
51798
51640
|
/***/ }),
|
|
51799
51641
|
|
|
51800
|
-
/***/ 2471:
|
|
51801
|
-
/***/ ((module) => {
|
|
51802
|
-
|
|
51803
|
-
"use strict";
|
|
51804
|
-
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"}}');
|
|
51805
|
-
|
|
51806
|
-
/***/ }),
|
|
51807
|
-
|
|
51808
51642
|
/***/ 9052:
|
|
51809
51643
|
/***/ ((module) => {
|
|
51810
51644
|
|
|
@@ -52205,7 +52039,7 @@ function reactProcessor() {
|
|
|
52205
52039
|
Fragment: React.Fragment,
|
|
52206
52040
|
components: _objectSpread({
|
|
52207
52041
|
'code-tabs': CodeTabs(sanitize, opts),
|
|
52208
|
-
'html-block': HTMLBlock(sanitize),
|
|
52042
|
+
'html-block': HTMLBlock(sanitize, opts),
|
|
52209
52043
|
'rdme-callout': Callout(sanitize),
|
|
52210
52044
|
'readme-variable': Variable,
|
|
52211
52045
|
'readme-glossary-item': GlossaryItem,
|