(url: string)
| 307 | const total = imageEntries.length + 1 |
| 308 | |
| 309 | const getExt = (url: string) => { |
| 310 | const fmt = url.match(/wx_fmt=(\w+)/)?.[1] || "" |
| 311 | if (fmt === "gif") return ".gif" |
| 312 | if (fmt === "png" || fmt === "webp") return ".png" |
| 313 | if (fmt === "bmp") return ".bmp" |
| 314 | if (url.includes("mmbiz_gif")) return ".gif" |
| 315 | if (url.includes("mmbiz_png") || url.includes("mmbiz_webp")) return ".png" |
| 316 | return ".jpg" |
| 317 | } |
| 318 | |
| 319 | // 下载图片并替换 markdown 中的 URL |
| 320 | for (let i = 0; i < imageEntries.length; i++) { |
no outgoing calls
no test coverage detected