Skip to content

Commit 74d4420

Browse files
committed
fix: make linkTransformer a promise
1 parent 402d349 commit 74d4420

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/notion-to-md.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export class NotionToMarkdown {
385385
title = matches ? matches[0] : type;
386386
}
387387

388-
return this.linkTransformer(title, link);
388+
return await this.linkTransformer(title, link);
389389
}
390390
}
391391
break;
@@ -410,7 +410,7 @@ export class NotionToMarkdown {
410410
}
411411

412412
if (blockContent)
413-
return this.linkTransformer(title, blockContent.url);
413+
return await this.linkTransformer(title, blockContent.url);
414414
}
415415
break;
416416

@@ -501,7 +501,10 @@ export class NotionToMarkdown {
501501
plain_text = this.annotatePlainText(plain_text, annotations);
502502

503503
if (content["href"])
504-
plain_text = this.linkTransformer(plain_text, content["href"]);
504+
plain_text = await this.linkTransformer(
505+
plain_text,
506+
content["href"],
507+
);
505508

506509
parsedData += plain_text;
507510
});

0 commit comments

Comments
 (0)