@wordpress/block-library
Version:
Block library for the WordPress editor.
28 lines (27 loc) • 995 B
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let _wordpress_block_editor = require("@wordpress/block-editor");
let react_jsx_runtime = require("react/jsx-runtime");
// packages/block-library/src/math/save.jsx
function save({ attributes }) {
const { latex, mathML } = attributes;
if (!latex) return null;
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
..._wordpress_block_editor.useBlockProps.save(),
children: mathML ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("math", {
display: "block",
dangerouslySetInnerHTML: { __html: mathML }
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("math", {
display: "block",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("semantics", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("annotation", {
encoding: "application/x-tex",
children: latex
}) })
})
});
}
exports.default = save;
//# sourceMappingURL=save.cjs.map