UNPKG

@wordpress/block-library

Version:
16 lines (15 loc) • 574 B
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