@wordpress/block-library
Version:
Block library for the WordPress editor.
16 lines (15 loc) • 574 B
JavaScript
import { RichText, useBlockProps } from "@wordpress/block-editor";
import { escape } from "./utils.mjs";
import { jsx } from "react/jsx-runtime";
// packages/block-library/src/code/save.jsx
function save({ attributes }) {
return /* @__PURE__ */ jsx("pre", {
...useBlockProps.save(),
children: /* @__PURE__ */ jsx(RichText.Content, {
tagName: "code",
value: escape(typeof attributes.content === "string" ? attributes.content : attributes.content.toHTMLString({ preserveWhiteSpace: true }))
})
});
}
export { save as default };
//# sourceMappingURL=save.mjs.map