fix: Account for multiple images on the same line of text when converting images for public share
closes #1602
This commit is contained in:
@ -8,7 +8,7 @@ type Options = {
|
||||
isPublic?: boolean,
|
||||
};
|
||||
|
||||
const attachmentRegex = /!\[.*\]\(\/api\/attachments\.redirect\?id=(?<id>.*)\)/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;
|
||||
|
||||
// replaces attachments.redirect urls with signed/authenticated url equivalents
|
||||
async function replaceImageAttachments(text) {
|
||||
|
Reference in New Issue
Block a user