(css: string, replacer: CssUrlReplacer)
| 100 | } |
| 101 | |
| 102 | async function rewriteCssImageSet(css: string, replacer: CssUrlReplacer): Promise<string> { |
| 103 | return await asyncReplace(css, cssImageSetRE, async (match) => { |
| 104 | const [, rawUrl] = match |
| 105 | const url = await processSrcSet(rawUrl, async ({ url }) => { |
| 106 | // the url maybe url(...) |
| 107 | if (cssUrlRE.test(url)) { |
| 108 | return await rewriteCssUrls(url, replacer) |
| 109 | } |
| 110 | if (!cssNotProcessedRE.test(url)) { |
| 111 | return await doUrlReplace(url, url, replacer) |
| 112 | } |
| 113 | return url |
| 114 | }) |
| 115 | return url |
| 116 | }) |
| 117 | } |
| 118 | |
| 119 | async function doUrlReplace( |
| 120 | rawUrl: string, |
nothing calls this directly
no test coverage detected