fix: Bad functional refactor
This commit is contained in:
@@ -6,7 +6,7 @@ const URL_REGEX = new RegExp("^https://codepen.io/(.*?)/(pen|embed)/(.*)$");
|
|||||||
|
|
||||||
export default function Codepen(props: Props) {
|
export default function Codepen(props: Props) {
|
||||||
const normalizedUrl = props.attrs.href.replace(/\/pen\//, "/embed/");
|
const normalizedUrl = props.attrs.href.replace(/\/pen\//, "/embed/");
|
||||||
return <Frame {...this.props} src={normalizedUrl} title="Codepen Embed" />;
|
return <Frame {...props} src={normalizedUrl} title="Codepen Embed" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
Codepen.ENABLED = [URL_REGEX];
|
Codepen.ENABLED = [URL_REGEX];
|
||||||
|
|||||||
Reference in New Issue
Block a user