@wordpress/blocks
Version:
Block API for WordPress.
26 lines (25 loc) • 713 B
JavaScript
// packages/blocks/src/api/parser/apply-built-in-validation-fixes.js
import { fixCustomClassname } from "./fix-custom-classname";
import { fixAriaLabel } from "./fix-aria-label";
function applyBuiltInValidationFixes(block, blockType) {
const { attributes, originalContent } = block;
let updatedBlockAttributes = attributes;
updatedBlockAttributes = fixCustomClassname(
attributes,
blockType,
originalContent
);
updatedBlockAttributes = fixAriaLabel(
updatedBlockAttributes,
blockType,
originalContent
);
return {
...block,
attributes: updatedBlockAttributes
};
}
export {
applyBuiltInValidationFixes
};
//# sourceMappingURL=apply-built-in-validation-fixes.js.map