@readme/markdown 9.1.6 → 9.2.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.node.js CHANGED
@@ -8464,7 +8464,7 @@ fromJSON.default = fromJSON
8464
8464
 
8465
8465
 
8466
8466
  let { nanoid } = __webpack_require__(5042)
8467
- let { isAbsolute, resolve } = __webpack_require__(4547)
8467
+ let { isAbsolute, resolve } = __webpack_require__(6928)
8468
8468
  let { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(7683)
8469
8469
  let { fileURLToPath, pathToFileURL } = __webpack_require__(7016)
8470
8470
 
@@ -9318,7 +9318,7 @@ list.default = list
9318
9318
  "use strict";
9319
9319
 
9320
9320
 
9321
- let { dirname, relative, resolve, sep } = __webpack_require__(4547)
9321
+ let { dirname, relative, resolve, sep } = __webpack_require__(6928)
9322
9322
  let { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(7683)
9323
9323
  let { pathToFileURL } = __webpack_require__(7016)
9324
9324
 
@@ -11032,7 +11032,7 @@ postcss.default = postcss
11032
11032
 
11033
11033
 
11034
11034
  let { existsSync, readFileSync } = __webpack_require__(9896)
11035
- let { dirname, join } = __webpack_require__(4547)
11035
+ let { dirname, join } = __webpack_require__(6928)
11036
11036
  let { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(7683)
11037
11037
 
11038
11038
  function fromBase64(str) {
@@ -15850,7 +15850,7 @@ module.exports = require("fs");
15850
15850
 
15851
15851
  /***/ }),
15852
15852
 
15853
- /***/ 4547:
15853
+ /***/ 6928:
15854
15854
  /***/ ((module) => {
15855
15855
 
15856
15856
  "use strict";
@@ -21485,11 +21485,8 @@ const GlossaryWithContext = (props) => {
21485
21485
 
21486
21486
  /* harmony default export */ const components_Glossary = (GlossaryWithContext);
21487
21487
 
21488
- ;// external {"amd":"react-dom/server","commonjs2":"react-dom/server","commonjs":"react-dom/server","root":"ReactDOM/server","umd":"react-dom/server"}
21489
- const server_namespaceObject = require("react-dom/server");
21490
21488
  ;// ./components/HTMLBlock/index.tsx
21491
21489
 
21492
-
21493
21490
  const MATCH_SCRIPT_TAGS = /<script\b[^>]*>([\s\S]*?)<\/script *>\n?/gim;
21494
21491
  const extractScripts = (html = '') => {
21495
21492
  const scripts = [];
@@ -21502,11 +21499,12 @@ const extractScripts = (html = '') => {
21502
21499
  return [cleaned, () => scripts.map(js => window.eval(js))];
21503
21500
  };
21504
21501
  const HTMLBlock = ({ children = '', runScripts, safeMode = false }) => {
21505
- let html = children;
21502
+ if (typeof children !== 'string') {
21503
+ throw new TypeError('HTMLBlock: children must be a string');
21504
+ }
21505
+ const html = children;
21506
21506
  // eslint-disable-next-line no-param-reassign
21507
21507
  runScripts = typeof runScripts !== 'boolean' ? runScripts === 'true' : runScripts;
21508
- if (typeof html !== 'string')
21509
- html = (0,server_namespaceObject.renderToStaticMarkup)(html);
21510
21508
  const [cleanedHtml, exec] = extractScripts(html);
21511
21509
  (0,external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.useEffect)(() => {
21512
21510
  if (typeof window !== 'undefined' && typeof runScripts === 'boolean' && runScripts)