diff --git a/shared/editor/embeds/Airtable.test.ts b/shared/editor/embeds/Airtable.test.ts index efb1e716b..4b8c0c507 100644 --- a/shared/editor/embeds/Airtable.test.ts +++ b/shared/editor/embeds/Airtable.test.ts @@ -5,6 +5,14 @@ describe("Airtable", () => { test("to be enabled on share link", () => { expect("https://airtable.com/shrEoQs3erLnppMie".match(match)).toBeTruthy(); + expect( + "https://airtable.com/shrEoQs3erLnppMie/tbl232i54yebXpr1J".match(match) + ).toBeTruthy(); + expect( + "https://airtable.com/app0lrLlMprqMbz11/shrEoQs3erLnppMie/tbl232i54yebXpr1J".match( + match + ) + ).toBeTruthy(); }); test("to be enabled on embed link", () => { diff --git a/shared/editor/embeds/Airtable.tsx b/shared/editor/embeds/Airtable.tsx index 856025b1c..9dcf99b23 100644 --- a/shared/editor/embeds/Airtable.tsx +++ b/shared/editor/embeds/Airtable.tsx @@ -2,7 +2,9 @@ import * as React from "react"; import Frame from "../components/Frame"; import { EmbedProps as Props } from "."; -const URL_REGEX = new RegExp("^https://airtable.com/(?:embed/)?(shr.*)$"); +const URL_REGEX = new RegExp( + "^https://airtable.com/(?:app.*/)?(?:embed/)?(shr.*)$" +); function Airtable(props: Props) { const { matches } = props.attrs;