UNPKG

@anoki/fse-ui

Version:

FSE UI components library

24 lines (23 loc) 656 B
import { j as o } from "./index.es244.js"; import i from "./index.es255.js"; import a from "./index.es256.js"; const z = (n, t = void 0) => { const e = i.sanitize(n).replace( /^<([a-z][a-z0-9]*)([^>]*)>(.*)<\/\1>$/i, "$3" ); return /* @__PURE__ */ o.jsx(a, { dangerouslySetInnerHTML: { __html: e }, as: t }); }, l = (n, t = "p") => { const r = i.sanitize(n, { ADD_ATTR: ["target"] }), e = t, s = r.replace( /^<([a-z][a-z0-9]*)([^>]*)>(.*)<\/\1>$/i, "$3" ); return /* @__PURE__ */ o.jsx(e, { dangerouslySetInnerHTML: { __html: s } }); }; export { l as HTML, z as HTMLBalancer }; //# sourceMappingURL=index.es146.js.map