Add fix to allow for different types of slash to be supported
Maybe updating glob broke it for Windows
This commit is contained in:
@ -9,7 +9,7 @@ for (const file of files) {
|
|||||||
from: /"@[a-z/-]*"/gi,
|
from: /"@[a-z/-]*"/gi,
|
||||||
to: (match) => {
|
to: (match) => {
|
||||||
const matchSlug = match.replace(/['"]+/g, "").replace(/[@]+/g, "").trim();
|
const matchSlug = match.replace(/['"]+/g, "").replace(/[@]+/g, "").trim();
|
||||||
const levelCount = file.split("/").length - 2;
|
const levelCount = file.split(/[\/\\]/).length - 2;
|
||||||
const backLevels = Array(levelCount).fill("../").join("");
|
const backLevels = Array(levelCount).fill("../").join("");
|
||||||
|
|
||||||
return `"${backLevels}${matchSlug}"`;
|
return `"${backLevels}${matchSlug}"`;
|
||||||
|
Reference in New Issue
Block a user