Skip to content

Commit 09c54c1

Browse files
authored
Merge pull request #264 from greatestview/feat/remove-gitlab-image-dimensions-hint
feat: remove GitLab image dimension text
2 parents 19e8411 + 54284cb commit 09c54c1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ export const migrateAttachments = async (
9292
s3: S3Settings | undefined,
9393
gitlabHelper: GitlabHelper
9494
) => {
95-
const regexp = /(!?)\[([^\]]+)\]\((\/uploads[^)]+)\)/g;
95+
// Also matches optional GitLab-specific {width=... height=...} attributes after the link
96+
const regexp = /(!?)\[([^\]]+)\]\((\/uploads[^)]+)\)(\{[^}]*\})?/g;
9697

9798
// Maps link offset to a new name in S3
9899
const offsetToAttachment: {

0 commit comments

Comments
 (0)