fix: Add support for Airtable share links with app ID
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user