fix: Aligned images do not load in publicly shared documents (#2248)

This commit is contained in:
Tom Moor
2021-06-25 10:09:44 -07:00
committed by GitHub
parent 3cec6b4903
commit c69b4efc34
2 changed files with 96 additions and 1 deletions

View File

@ -1,5 +1,5 @@
// @flow
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;
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(