fix: text strings not being done properly

This commit is contained in:
Lewis Crichton 2023-11-30 19:23:26 +00:00
parent ea864b9a00
commit 34e1c83756
No known key found for this signature in database

View file

@ -88,6 +88,15 @@ export async function compileUsercss(fileName: string) {
varsToPass[k] = `${varsToPass[k]}${v.units ?? "px"}`; varsToPass[k] = `${varsToPass[k]}${v.units ?? "px"}`;
break; break;
} }
case "text": {
if (preprocessor === "stylus") {
varsToPass[k] = `"${varsToPass[k].replace(/"/g, "\" + '\"' + \"")}"`;
} else {
varsToPass[k] = `"${varsToPass[k].replace(/\//g, "\\\\").replace(/"/g, '\\"')}"`;
}
break;
}
} }
} }