diff --git a/shared/embeds/Vimeo.tsx b/shared/embeds/Vimeo.tsx index a9b9e1c43..bf479812f 100644 --- a/shared/embeds/Vimeo.tsx +++ b/shared/embeds/Vimeo.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import Frame from "./components/Frame"; import { EmbedProps as Props } from "."; -const URL_REGEX = /(http|https)?:\/\/(www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(\d+)(?:|\/\?)/; +const URL_REGEX = /(http|https)?:\/\/(www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(\d\w+)(?:\/|\?)?(\d\w+)?/; export default class Vimeo extends React.Component { static ENABLED = [URL_REGEX]; @@ -10,11 +10,17 @@ export default class Vimeo extends React.Component { render() { const { matches } = this.props.attrs; const videoId = matches[4]; + const hId = matches[5]; + return ( ); } diff --git a/shared/embeds/components/Frame.tsx b/shared/embeds/components/Frame.tsx index 815d61d5d..ea4e6c5db 100644 --- a/shared/embeds/components/Frame.tsx +++ b/shared/embeds/components/Frame.tsx @@ -4,15 +4,6 @@ import { OpenIcon } from "outline-icons"; import * as React from "react"; import styled from "styled-components"; -// This wrapper allows us to pass non-standard HTML attributes through to the DOM element -// https://www.styled-components.com/docs/basics#passed-props -// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type. -const Iframe = (props) =>