@readme/markdown 6.45.0 → 6.46.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/dist/main.js CHANGED
@@ -9180,7 +9180,7 @@ Anchor.defaultProps = {
9180
9180
  title: ''
9181
9181
  };
9182
9182
 
9183
- var AnchorContext = function AnchorContext(props) {
9183
+ var AnchorWithContext = function AnchorWithContext(props) {
9184
9184
  return /*#__PURE__*/React.createElement(BaseUrlContext.Consumer, null, function (baseUrl) {
9185
9185
  return /*#__PURE__*/React.createElement(Anchor, _extends({
9186
9186
  baseUrl: baseUrl
@@ -9188,12 +9188,14 @@ var AnchorContext = function AnchorContext(props) {
9188
9188
  });
9189
9189
  };
9190
9190
 
9191
- module.exports = function (sanitizeSchema) {
9191
+ AnchorWithContext.sanitize = function (sanitizeSchema) {
9192
9192
  // This is for our custom link formats
9193
9193
  sanitizeSchema.protocols.href.push('doc', 'target', 'ref', 'blog', 'changelog', 'page');
9194
- return AnchorContext;
9194
+ return sanitizeSchema;
9195
9195
  };
9196
9196
 
9197
+ module.exports = AnchorWithContext;
9198
+
9197
9199
  /***/ }),
9198
9200
 
9199
9201
  /***/ 2015:
@@ -9257,11 +9259,13 @@ Callout.defaultProps = {
9257
9259
  node: null
9258
9260
  };
9259
9261
 
9260
- module.exports = function (sanitizeSchema) {
9262
+ Callout.sanitize = function (sanitizeSchema) {
9261
9263
  sanitizeSchema.attributes['rdme-callout'] = ['icon', 'theme', 'title', 'value'];
9262
- return Callout;
9264
+ return sanitizeSchema;
9263
9265
  };
9264
9266
 
9267
+ module.exports = Callout;
9268
+
9265
9269
  /***/ }),
9266
9270
 
9267
9271
  /***/ 8297:
@@ -9357,12 +9361,10 @@ function Code(props) {
9357
9361
  }), codeContent));
9358
9362
  }
9359
9363
 
9360
- function CreateCode(sanitizeSchema, _ref2) {
9364
+ function CreateCode(_ref2) {
9361
9365
  var copyButtons = _ref2.copyButtons,
9362
9366
  theme = _ref2.theme;
9363
- // This is for code blocks class name
9364
- sanitizeSchema.attributes.code = ['className', 'lang', 'meta', 'value']; // eslint-disable-next-line react/display-name
9365
-
9367
+ // eslint-disable-next-line react/display-name
9366
9368
  return function (props) {
9367
9369
  return /*#__PURE__*/React.createElement(Code, _extends({}, props, {
9368
9370
  copyButtons: copyButtons,
@@ -9386,10 +9388,14 @@ Code.defaultProps = {
9386
9388
  meta: ''
9387
9389
  };
9388
9390
 
9389
- module.exports = function (sanitizeSchema, opts) {
9390
- return CreateCode(sanitizeSchema, opts);
9391
+ CreateCode.sanitize = function (sanitizeSchema) {
9392
+ // This is for code blocks class name
9393
+ sanitizeSchema.attributes.code = ['className', 'lang', 'meta', 'value'];
9394
+ return sanitizeSchema;
9391
9395
  };
9392
9396
 
9397
+ module.exports = CreateCode;
9398
+
9393
9399
  /***/ }),
9394
9400
 
9395
9401
  /***/ 6553:
@@ -9468,9 +9474,7 @@ function CreateCodeTabs(_ref3) {
9468
9474
  };
9469
9475
  }
9470
9476
 
9471
- module.exports = function (_, opts) {
9472
- return CreateCodeTabs(opts);
9473
- };
9477
+ module.exports = CreateCodeTabs;
9474
9478
 
9475
9479
  /***/ }),
9476
9480
 
@@ -9625,10 +9629,7 @@ Embed.defaultProps = {
9625
9629
  height: '300px',
9626
9630
  width: '100%'
9627
9631
  };
9628
-
9629
- module.exports = function () {
9630
- return Embed;
9631
- };
9632
+ module.exports = Embed;
9632
9633
 
9633
9634
  /***/ }),
9634
9635
 
@@ -9813,12 +9814,14 @@ var CreateHtmlBlock = function CreateHtmlBlock(_ref) {
9813
9814
  );
9814
9815
  };
9815
9816
 
9816
- module.exports = function (sanitize, opts) {
9817
- sanitize.tagNames.push('html-block');
9818
- sanitize.attributes['html-block'] = ['html', 'runScripts'];
9819
- return CreateHtmlBlock(opts);
9817
+ CreateHtmlBlock.sanitize = function (schema) {
9818
+ schema.tagNames.push('html-block');
9819
+ schema.attributes['html-block'] = ['html', 'runScripts'];
9820
+ return schema;
9820
9821
  };
9821
9822
 
9823
+ module.exports = CreateHtmlBlock;
9824
+
9822
9825
  /***/ }),
9823
9826
 
9824
9827
  /***/ 1984:
@@ -10119,11 +10122,53 @@ Image.defaultProps = {
10119
10122
  width: 'auto'
10120
10123
  };
10121
10124
 
10122
- module.exports = function (sanitizeSchema) {
10125
+ Image.sanitize = function (sanitizeSchema) {
10123
10126
  sanitizeSchema.attributes.img = ['className', 'title', 'alt', 'width', 'height', 'align', 'src', 'longDesc'];
10124
- return Image;
10127
+ return sanitizeSchema;
10125
10128
  };
10126
10129
 
10130
+ module.exports = Image;
10131
+
10132
+ /***/ }),
10133
+
10134
+ /***/ 3197:
10135
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10136
+
10137
+ var _extends = __webpack_require__(7154);
10138
+
10139
+ var React = __webpack_require__(4466);
10140
+
10141
+ var PropTypes = __webpack_require__(5697);
10142
+
10143
+ var Style = function Style(_ref) {
10144
+ var children = _ref.children,
10145
+ safeMode = _ref.safeMode;
10146
+ return safeMode ? /*#__PURE__*/React.createElement("pre", null, /*#__PURE__*/React.createElement("code", null, "<style>\n".concat(children, "\n</style>"))) : /*#__PURE__*/React.createElement("style", null, children);
10147
+ };
10148
+
10149
+ Style.propTypes = {
10150
+ children: PropTypes.node,
10151
+ safeMode: PropTypes.bool
10152
+ };
10153
+
10154
+ var CreateStyle = function CreateStyle(_ref2) {
10155
+ var safeMode = _ref2.safeMode;
10156
+ return (// eslint-disable-next-line react/display-name
10157
+ function (props) {
10158
+ return /*#__PURE__*/React.createElement(Style, _extends({}, props, {
10159
+ safeMode: safeMode
10160
+ }));
10161
+ }
10162
+ );
10163
+ };
10164
+
10165
+ CreateStyle.sanitize = function (sanitize) {
10166
+ sanitize.tagNames.push('style');
10167
+ return sanitize;
10168
+ };
10169
+
10170
+ module.exports = CreateStyle;
10171
+
10127
10172
  /***/ }),
10128
10173
 
10129
10174
  /***/ 484:
@@ -10145,10 +10190,7 @@ function Table(props) {
10145
10190
  Table.propTypes = {
10146
10191
  children: PropTypes.arrayOf(PropTypes.node).isRequired
10147
10192
  };
10148
-
10149
- module.exports = function () {
10150
- return Table;
10151
- };
10193
+ module.exports = Table;
10152
10194
 
10153
10195
  /***/ }),
10154
10196
 
@@ -10195,8 +10237,9 @@ __webpack_require__.r(__webpack_exports__);
10195
10237
  /* harmony export */ "HTMLBlock": () => (/* reexport default from dynamic */ _HTMLBlock__WEBPACK_IMPORTED_MODULE_6___default.a),
10196
10238
  /* harmony export */ "Heading": () => (/* reexport default from dynamic */ _Heading__WEBPACK_IMPORTED_MODULE_7___default.a),
10197
10239
  /* harmony export */ "Image": () => (/* reexport default from dynamic */ _Image__WEBPACK_IMPORTED_MODULE_8___default.a),
10198
- /* harmony export */ "Table": () => (/* reexport default from dynamic */ _Table__WEBPACK_IMPORTED_MODULE_9___default.a),
10199
- /* harmony export */ "TableOfContents": () => (/* reexport default from dynamic */ _TableOfContents__WEBPACK_IMPORTED_MODULE_10___default.a)
10240
+ /* harmony export */ "Style": () => (/* reexport default from dynamic */ _Style__WEBPACK_IMPORTED_MODULE_9___default.a),
10241
+ /* harmony export */ "Table": () => (/* reexport default from dynamic */ _Table__WEBPACK_IMPORTED_MODULE_10___default.a),
10242
+ /* harmony export */ "TableOfContents": () => (/* reexport default from dynamic */ _TableOfContents__WEBPACK_IMPORTED_MODULE_11___default.a)
10200
10243
  /* harmony export */ });
10201
10244
  /* harmony import */ var _Anchor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8447);
10202
10245
  /* harmony import */ var _Anchor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Anchor__WEBPACK_IMPORTED_MODULE_0__);
@@ -10216,10 +10259,13 @@ __webpack_require__.r(__webpack_exports__);
10216
10259
  /* harmony import */ var _Heading__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_Heading__WEBPACK_IMPORTED_MODULE_7__);
10217
10260
  /* harmony import */ var _Image__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9167);
10218
10261
  /* harmony import */ var _Image__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_Image__WEBPACK_IMPORTED_MODULE_8__);
10219
- /* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(484);
10220
- /* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_Table__WEBPACK_IMPORTED_MODULE_9__);
10221
- /* harmony import */ var _TableOfContents__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4479);
10222
- /* harmony import */ var _TableOfContents__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_TableOfContents__WEBPACK_IMPORTED_MODULE_10__);
10262
+ /* harmony import */ var _Style__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3197);
10263
+ /* harmony import */ var _Style__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_Style__WEBPACK_IMPORTED_MODULE_9__);
10264
+ /* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(484);
10265
+ /* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_Table__WEBPACK_IMPORTED_MODULE_10__);
10266
+ /* harmony import */ var _TableOfContents__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(4479);
10267
+ /* harmony import */ var _TableOfContents__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_TableOfContents__WEBPACK_IMPORTED_MODULE_11__);
10268
+
10223
10269
 
10224
10270
 
10225
10271
 
@@ -10259,12 +10305,10 @@ var _slicedToArray = __webpack_require__(3038);
10259
10305
 
10260
10306
  /* eslint-disable no-param-reassign
10261
10307
  */
10262
- var sanitize = __webpack_require__(8229);
10263
-
10264
10308
  var kebabCase = __webpack_require__(5683);
10265
10309
 
10266
- var registerCustomComponents = function registerCustomComponents(components) {
10267
- var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x';
10310
+ var registerCustomComponents = function registerCustomComponents(components, sanitize) {
10311
+ var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'x';
10268
10312
  return Object.entries(components).reduce(function (all, _ref) {
10269
10313
  var _ref2 = _slicedToArray(_ref, 2),
10270
10314
  tag = _ref2[0],
@@ -29431,22 +29475,35 @@ module.exports.tableFlattening = transformer;
29431
29475
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
29432
29476
 
29433
29477
  var _require = __webpack_require__(2781),
29434
- sanitize = _require.defaultSchema; // Sanitization Schema Defaults
29478
+ defaultSchema = _require.defaultSchema;
29479
+
29480
+ var createSchema = function createSchema() {
29481
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
29482
+ safeMode = _ref.safeMode;
29483
+
29484
+ var schema = JSON.parse(JSON.stringify(defaultSchema)); // Sanitization Schema Defaults
29485
+
29486
+ schema.clobberPrefix = '';
29487
+ schema.tagNames.push('span');
29488
+ schema.attributes['*'].push('class', 'className', 'align');
29489
+
29490
+ if (!safeMode) {
29491
+ schema.attributes['*'].push('style');
29492
+ }
29435
29493
 
29494
+ schema.tagNames.push('rdme-pin');
29495
+ schema.tagNames.push('rdme-embed');
29496
+ schema.attributes['rdme-embed'] = ['url', 'provider', 'html', 'title', 'href', 'iframe', 'width', 'height', 'image', 'favicon'];
29497
+ schema.attributes.a = ['href', 'title', 'class', 'className', 'download'];
29498
+ schema.tagNames.push('figure');
29499
+ schema.tagNames.push('figcaption');
29500
+ schema.tagNames.push('input'); // allow GitHub-style todo lists
29436
29501
 
29437
- sanitize.clobberPrefix = '';
29438
- sanitize.tagNames.push('span', 'style');
29439
- sanitize.attributes['*'].push('class', 'className', 'align', 'style');
29440
- sanitize.tagNames.push('rdme-pin');
29441
- sanitize.tagNames.push('rdme-embed');
29442
- sanitize.attributes['rdme-embed'] = ['url', 'provider', 'html', 'title', 'href', 'iframe', 'width', 'height', 'image', 'favicon'];
29443
- sanitize.attributes.a = ['href', 'title', 'class', 'className', 'download'];
29444
- sanitize.tagNames.push('figure');
29445
- sanitize.tagNames.push('figcaption');
29446
- sanitize.tagNames.push('input'); // allow GitHub-style todo lists
29502
+ schema.ancestors.input = ['li'];
29503
+ return schema;
29504
+ };
29447
29505
 
29448
- sanitize.ancestors.input = ['li'];
29449
- module.exports = sanitize;
29506
+ module.exports = createSchema;
29450
29507
 
29451
29508
  /***/ }),
29452
29509
 
@@ -52050,7 +52107,7 @@ var unified = __webpack_require__(8835);
52050
52107
  */
52051
52108
 
52052
52109
 
52053
- var sanitize = __webpack_require__(8229);
52110
+ var createSchema = __webpack_require__(8229);
52054
52111
 
52055
52112
  var generateTOC = __webpack_require__(3263);
52056
52113
 
@@ -52102,14 +52159,13 @@ var GlossaryItem = Components.GlossaryItem,
52102
52159
  Image = Components.Image,
52103
52160
  Embed = Components.Embed,
52104
52161
  HTMLBlock = Components.HTMLBlock,
52162
+ Style = Components.Style,
52105
52163
  TableOfContents = Components.TableOfContents;
52106
52164
 
52107
52165
  /* Custom Unified Parsers
52108
52166
  */
52109
52167
 
52110
- var customParsers = Object.values(__webpack_require__(1332)).map(function (parser) {
52111
- return parser.sanitize(sanitize);
52112
- });
52168
+ var CustomParsers = Object.values(__webpack_require__(1332));
52113
52169
  /* Custom Unified Compilers
52114
52170
  */
52115
52171
 
@@ -52133,14 +52189,23 @@ var _require2 = __webpack_require__(2531),
52133
52189
 
52134
52190
  var registerCustomComponents = __webpack_require__(1264);
52135
52191
  /**
52136
- * Normalize Magic Block Raw Text
52192
+ * Setup Options
52193
+ * !Normalize Magic Block Raw Text!
52137
52194
  */
52138
52195
 
52139
52196
 
52140
52197
  function setup(blocks) {
52141
52198
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52142
52199
  // merge default and user options
52143
- opts = parseOptions(opts); // normalize magic block linebreaks
52200
+ opts = parseOptions(opts);
52201
+
52202
+ if (!opts.sanitize) {
52203
+ opts.sanitize = createSchema(opts);
52204
+ Object.values(Components).forEach(function (Component) {
52205
+ return Component.sanitize && Component.sanitize(opts.sanitize);
52206
+ });
52207
+ } // normalize magic block linebreaks
52208
+
52144
52209
 
52145
52210
  if (opts.normalize && blocks) {
52146
52211
  blocks = blocks.replace(/\[block:/g, '\n\n[block:').replace(/\[\/block\]/g, '[/block]\n');
@@ -52166,25 +52231,16 @@ var utils = {
52166
52231
  function processor() {
52167
52232
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
52168
52233
 
52169
- /*
52170
- * This is kinda complicated: "markdown" within ReadMe is
52171
- * often more than just markdown. It can also include HTML,
52172
- * as well as custom syntax constructs such as <<variables>>,
52173
- * and other special features.
52174
- *
52175
- * We use the Unified text processor to parse and transform
52176
- * Markdown to various output formats, such as a React component
52177
- * tree. (See https://github.com/unifiedjs/unified for more.)
52178
- *
52179
- * The order for processing ReadMe-flavored markdown is as follows:
52180
- * - parse markdown
52181
- * - parse custom syntaxes add-ons using custom compilers
52182
- * - convert from a remark mdast (markdown ast) to a rehype hast (hypertext ast)
52183
- * - extract any raw HTML elements
52184
- * - sanitize and remove any disallowed attributes
52185
- * - output the hast to a React vdom with our custom components
52186
- */
52187
- return unified().use(remarkParse, opts.markdownOptions).use(remarkFrontmatter, ['yaml', 'toml']).data('settings', opts.settings).data('compatibilityMode', opts.compatibilityMode).use(!opts.correctnewlines ? remarkBreaks : function () {}).use(customParsers).use(remarkSlug).use(remarkDisableTokenizers, opts.disableTokenizers).use(remarkRehype, {
52234
+ var _setup = setup('', opts);
52235
+
52236
+ var _setup2 = _slicedToArray(_setup, 2);
52237
+
52238
+ opts = _setup2[1];
52239
+ var _opts = opts,
52240
+ sanitize = _opts.sanitize;
52241
+ return unified().use(remarkParse, opts.markdownOptions).use(remarkFrontmatter, ['yaml', 'toml']).data('settings', opts.settings).data('compatibilityMode', opts.compatibilityMode).use(!opts.correctnewlines ? remarkBreaks : function () {}).use(CustomParsers.map(function (parser) {
52242
+ return parser.sanitize(sanitize);
52243
+ })).use(remarkSlug).use(remarkDisableTokenizers, opts.disableTokenizers).use(remarkRehype, {
52188
52244
  allowDangerousHtml: true
52189
52245
  }).use(rehypeRaw).use(rehypeSanitize, sanitize);
52190
52246
  }
@@ -52193,12 +52249,12 @@ function plain(text) {
52193
52249
  var components = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
52194
52250
  if (!text) return null;
52195
52251
 
52196
- var _setup = setup(text, opts);
52252
+ var _setup3 = setup(text, opts);
52197
52253
 
52198
- var _setup2 = _slicedToArray(_setup, 2);
52254
+ var _setup4 = _slicedToArray(_setup3, 2);
52199
52255
 
52200
- text = _setup2[0];
52201
- opts = _setup2[1];
52256
+ text = _setup4[0];
52257
+ opts = _setup4[1];
52202
52258
  return processor(opts).use(rehypeReact, {
52203
52259
  createElement: React.createElement,
52204
52260
  Fragment: React.Fragment,
@@ -52222,46 +52278,57 @@ var count = {};
52222
52278
  function reactProcessor() {
52223
52279
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
52224
52280
  var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52225
- return processor(opts).use(sectionAnchorId).use(rehypeReact, {
52281
+
52282
+ var _setup5 = setup('', opts);
52283
+
52284
+ var _setup6 = _slicedToArray(_setup5, 2);
52285
+
52286
+ opts = _setup6[1];
52287
+ var _opts2 = opts,
52288
+ sanitize = _opts2.sanitize;
52289
+ return processor(_objectSpread({
52290
+ sanitize: sanitize
52291
+ }, opts)).use(sectionAnchorId).use(rehypeReact, {
52226
52292
  createElement: React.createElement,
52227
52293
  Fragment: React.Fragment,
52228
52294
  components: _objectSpread({
52229
- 'code-tabs': CodeTabs(sanitize, opts),
52230
- 'html-block': HTMLBlock(sanitize, opts),
52231
- 'rdme-callout': Callout(sanitize),
52295
+ 'code-tabs': CodeTabs(opts),
52296
+ 'html-block': HTMLBlock(opts),
52297
+ 'rdme-callout': Callout,
52232
52298
  'readme-variable': Variable,
52233
52299
  'readme-glossary-item': GlossaryItem,
52234
- 'rdme-embed': Embed(sanitize),
52300
+ 'rdme-embed': Embed,
52235
52301
  'rdme-pin': PinWrap,
52236
- table: Table(sanitize),
52237
- a: Anchor(sanitize),
52302
+ table: Table,
52303
+ a: Anchor,
52238
52304
  h1: Heading(1, count, opts),
52239
52305
  h2: Heading(2, count, opts),
52240
52306
  h3: Heading(3, count, opts),
52241
52307
  h4: Heading(4, count, opts),
52242
52308
  h5: Heading(5, count, opts),
52243
52309
  h6: Heading(6, count, opts),
52244
- code: Code(sanitize, opts),
52245
- img: Image(sanitize)
52246
- }, registerCustomComponents(components, opts.customComponentPrefix))
52310
+ code: Code(opts),
52311
+ img: Image,
52312
+ style: Style(opts)
52313
+ }, registerCustomComponents(components, sanitize, opts.customComponentPrefix))
52247
52314
  });
52248
52315
  }
52249
52316
  function react(content) {
52250
52317
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52251
52318
  var components = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
52252
52319
  if (!content) return null;else if (typeof content === 'string') {
52253
- var _setup3 = setup(content, opts);
52320
+ var _setup7 = setup(content, opts);
52254
52321
 
52255
- var _setup4 = _slicedToArray(_setup3, 2);
52322
+ var _setup8 = _slicedToArray(_setup7, 2);
52256
52323
 
52257
- content = _setup4[0];
52258
- opts = _setup4[1];
52324
+ content = _setup8[0];
52325
+ opts = _setup8[1];
52259
52326
  } else {
52260
- var _setup5 = setup('', opts);
52327
+ var _setup9 = setup('', opts);
52261
52328
 
52262
- var _setup6 = _slicedToArray(_setup5, 2);
52329
+ var _setup10 = _slicedToArray(_setup9, 2);
52263
52330
 
52264
- opts = _setup6[1];
52331
+ opts = _setup10[1];
52265
52332
  }
52266
52333
  var proc = reactProcessor(opts, components);
52267
52334
  if (typeof content === 'string') content = proc.parse(content);
@@ -52271,11 +52338,11 @@ function reactTOC(tree) {
52271
52338
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52272
52339
  if (!tree) return null;
52273
52340
 
52274
- var _setup7 = setup('', opts);
52341
+ var _setup11 = setup('', opts);
52275
52342
 
52276
- var _setup8 = _slicedToArray(_setup7, 2);
52343
+ var _setup12 = _slicedToArray(_setup11, 2);
52277
52344
 
52278
- opts = _setup8[1];
52345
+ opts = _setup12[1];
52279
52346
  var proc = processor(opts).use(rehypeReact, {
52280
52347
  createElement: React.createElement,
52281
52348
  components: {
@@ -52308,12 +52375,12 @@ function html(text) {
52308
52375
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52309
52376
  if (!text) return null;
52310
52377
 
52311
- var _setup9 = setup(text, opts);
52378
+ var _setup13 = setup(text, opts);
52312
52379
 
52313
- var _setup10 = _slicedToArray(_setup9, 2);
52380
+ var _setup14 = _slicedToArray(_setup13, 2);
52314
52381
 
52315
- text = _setup10[0];
52316
- opts = _setup10[1];
52382
+ text = _setup14[0];
52383
+ opts = _setup14[1];
52317
52384
  return processor(opts).use(rehypeStringify).processSync(text).contents;
52318
52385
  }
52319
52386
  /**
@@ -52324,12 +52391,12 @@ function hast(text) {
52324
52391
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52325
52392
  if (!text) return null;
52326
52393
 
52327
- var _setup11 = setup(text, opts);
52394
+ var _setup15 = setup(text, opts);
52328
52395
 
52329
- var _setup12 = _slicedToArray(_setup11, 2);
52396
+ var _setup16 = _slicedToArray(_setup15, 2);
52330
52397
 
52331
- text = _setup12[0];
52332
- opts = _setup12[1];
52398
+ text = _setup16[0];
52399
+ opts = _setup16[1];
52333
52400
  var rdmd = processor(opts).use(tableFlattening);
52334
52401
  var node = rdmd.parse(text);
52335
52402
  return rdmd.runSync(node);
@@ -52342,12 +52409,12 @@ function mdast(text) {
52342
52409
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52343
52410
  if (!text) return null;
52344
52411
 
52345
- var _setup13 = setup(text, opts);
52412
+ var _setup17 = setup(text, opts);
52346
52413
 
52347
- var _setup14 = _slicedToArray(_setup13, 2);
52414
+ var _setup18 = _slicedToArray(_setup17, 2);
52348
52415
 
52349
- text = _setup14[0];
52350
- opts = _setup14[1];
52416
+ text = _setup18[0];
52417
+ opts = _setup18[1];
52351
52418
  return processor(opts).parse(text);
52352
52419
  }
52353
52420
  /**
@@ -52358,11 +52425,11 @@ function astToPlainText(node) {
52358
52425
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52359
52426
  if (!node) return '';
52360
52427
 
52361
- var _setup15 = setup('', opts);
52428
+ var _setup19 = setup('', opts);
52362
52429
 
52363
- var _setup16 = _slicedToArray(_setup15, 2);
52430
+ var _setup20 = _slicedToArray(_setup19, 2);
52364
52431
 
52365
- opts = _setup16[1];
52432
+ opts = _setup20[1];
52366
52433
  return processor(opts).use(toPlainText).stringify(node);
52367
52434
  }
52368
52435
  /**
@@ -52373,11 +52440,11 @@ function md(tree) {
52373
52440
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52374
52441
  if (!tree) return null;
52375
52442
 
52376
- var _setup17 = setup('', opts);
52443
+ var _setup21 = setup('', opts);
52377
52444
 
52378
- var _setup18 = _slicedToArray(_setup17, 2);
52445
+ var _setup22 = _slicedToArray(_setup21, 2);
52379
52446
 
52380
- opts = _setup18[1];
52447
+ opts = _setup22[1];
52381
52448
  return processor(opts).use(remarkStringify, opts.markdownOptions).use(customCompilers).stringify(tree);
52382
52449
  }
52383
52450