Skip to content

Commit

Permalink
fix: sync error
Browse files Browse the repository at this point in the history
  • Loading branch information
fish.yu committed Apr 18, 2024
1 parent aff68f4 commit 0e3bee7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ class Downloader {
const reg = /!\[(.*?)\]\((.*?)\)/g;
const matches = mdBody.match(reg);
if (matches?.length) {
matches.forEach(async(match) => {
const src = match.match(/\((.*?)\)/)[1];
for (let i = 0; i < matches.length; i++) {
const src = matches[i].match(/\((.*?)\)/)[1];
console.log('image src:', src, '\n');
const imageUrl = await this.uploadImageFromUrl(cover);
const imageUrl = await this.uploadImageFromUrl(src);
mdBody = mdBody.replace(src, imageUrl);
})
}
}
// 处理脑图
if (format === 'lakeboard' && cover) {
Expand Down

0 comments on commit 0e3bee7

Please sign in to comment.