UNPKG

@jverneaut/html-to-gutenberg

Version:

Create custom Gutenberg blocks from the HTML templates you already have.

10 lines (8 loc) 222 B
import { visit } from "unist-util-visit"; export default (ast, attributeName) => { visit(ast, "element", (node) => { if (node.properties[attributeName]) { delete node.properties[attributeName]; } }); };