fix: HoverPreview not showing on collaborative editing teams
types
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { compact } from "lodash";
|
||||
|
||||
const attachmentRegex = /\/api\/attachments\.redirect\?id=(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
|
||||
|
||||
export default function parseAttachmentIds(text: any): string[] {
|
||||
return [...text.matchAll(attachmentRegex)].map(
|
||||
(match) => match.groups && match.groups.id
|
||||
export default function parseAttachmentIds(text: string): string[] {
|
||||
return compact(
|
||||
[...text.matchAll(attachmentRegex)].map(
|
||||
(match) => match.groups && match.groups.id
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user