[*Theme] Fix imports starting with //
This commit is contained in:
parent
fc795a700b
commit
11424b18eb
|
@ -73,7 +73,8 @@ export default async (manifest, _content, repo) => {
|
||||||
|
|
||||||
let imports = content.match(/@import url\(['"`]?(.*)['"`]?\);/g) || [];
|
let imports = content.match(/@import url\(['"`]?(.*)['"`]?\);/g) || [];
|
||||||
for (const x of imports) {
|
for (const x of imports) {
|
||||||
const url = x.replace(/@import url\(['"`]?/, '').replace(/['"`]?\);/, '');
|
let url = x.replace(/@import url\(['"`]?/, '').replace(/['"`]?\);/, '');
|
||||||
|
if (url.startsWith('//')) url = 'https:' + url;
|
||||||
|
|
||||||
console.log(x, url);
|
console.log(x, url);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue