UNPKG

@wordpress/block-library

Version:
22 lines (21 loc) 620 B
// packages/block-library/src/code/save.js import { RichText, useBlockProps } from "@wordpress/block-editor"; import { escape } from "./utils"; import { jsx } from "react/jsx-runtime"; 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.js.map