@superinterface/react 3.17.3 → 3.18.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/index.cjs CHANGED
@@ -41681,6 +41681,15 @@ var MarkdownContext = /* @__PURE__ */ (0, import_react25.createContext)({
41681
41681
  var useMarkdownContext = function() {
41682
41682
  return (0, import_react26.useContext)(MarkdownContext);
41683
41683
  };
41684
+ // src/lib/markdown/escapeInvalidTagNames.ts
41685
+ var isValidTagName = function(tagName) {
41686
+ return /^[A-Za-z_][A-Za-z0-9_.:-]*$/.test(tagName);
41687
+ };
41688
+ var escapeInvalidTagNames = function(markdown) {
41689
+ return markdown.replace(/<([^\s>/]+)([^>]*)>/g, function(fullMatch, tagName) {
41690
+ return isValidTagName(tagName) ? fullMatch : fullMatch.replace(/</g, "&lt;").replace(/>/g, "&gt;");
41691
+ });
41692
+ };
41684
41693
  // ../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js
41685
41694
  var import_react27 = require("react");
41686
41695
  var ErrorBoundaryContext = /* @__PURE__ */ (0, import_react27.createContext)(null);
@@ -41914,7 +41923,7 @@ var TextContent = function(t0) {
41914
41923
  ]);
41915
41924
  return [
41916
41925
  4,
41917
- (0, import_mdx.compile)(content2.text.value, {
41926
+ (0, import_mdx.compile)(escapeInvalidTagNames(content2.text.value), {
41918
41927
  outputFormat: "function-body",
41919
41928
  remarkPlugins: remarkPlugins,
41920
41929
  recmaPlugins: [