diff --git a/src/utils.ts b/src/utils.ts index 9ed95d5..dc31a19 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -92,7 +92,8 @@ export const migrateAttachments = async ( s3: S3Settings | undefined, gitlabHelper: GitlabHelper ) => { - const regexp = /(!?)\[([^\]]+)\]\((\/uploads[^)]+)\)/g; + // Also matches optional GitLab-specific {width=... height=...} attributes after the link + const regexp = /(!?)\[([^\]]+)\]\((\/uploads[^)]+)\)(\{[^}]*\})?/g; // Maps link offset to a new name in S3 const offsetToAttachment: {