Skip to content

Commit

Permalink
Merge pull request #819 from obgnail/dev
Browse files Browse the repository at this point in the history
fix: resourceOperation. #818
  • Loading branch information
obgnail authored Oct 27, 2024
2 parents 9e5d88d + 1470b60 commit b9097a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/custom/plugins/resourceOperation.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Designed with ♥ by [obgnail](https://github.com/obgnail/typora_plugin)
}

const collectMatch = content => {
return Promise.all(content.matchAll(this.regexp).map(async match => {
const promises = Array.from(content.matchAll(this.regexp), async match => {
let src = match.groups.src1 || match.groups.src2;
if (!src) return;

Expand All @@ -293,7 +293,8 @@ Designed with ♥ by [obgnail](https://github.com/obgnail/typora_plugin)
if (remain) {
await collectMatch(remain + ")");
}
}))
})
return Promise.all(promises)
}

const ext = extname(filePath).toLowerCase();
Expand Down

0 comments on commit b9097a0

Please sign in to comment.