UNPKG

@anoki/fse-ui

Version:

FSE UI components library

22 lines (21 loc) 653 B
import { j as o } from "./index.es278.js"; import { sanitize as s } from "./index.es289.js"; import a from "./index.es290.js"; const d = (t, n = void 0) => { const e = s(t).replace( /^<([a-z][a-z0-9]*)([^>]*)>(.*)<\/\1>$/i, "$3" ); return /* @__PURE__ */ o.jsx(a, { dangerouslySetInnerHTML: { __html: e }, as: n }); }, z = (t, n = "p") => { const r = s(t, { addAttributes: ["target"] }), e = n, i = r.replace( /^<([a-z][a-z0-9]*)([^>]*)>(.*)<\/\1>$/i, "$3" ); return /* @__PURE__ */ o.jsx(e, { dangerouslySetInnerHTML: { __html: i } }); }; export { z as HTML, d as HTMLBalancer }; //# sourceMappingURL=index.es159.js.map