Escape SCSS import path

This commit is contained in:
Samuel Elliott 2018-03-05 16:19:09 +00:00
parent 382ee68125
commit f236abdca9
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ class Comms {
BDIpc.on('bd-compileSass', o => {
if (!o.args.path && !o.args.data) return o.reply('');
if (typeof o.args.path === 'string' && typeof o.args.data === 'string') {
o.args.data = `${o.args.data} @import '${o.args.path}';`;
o.args.data = `${o.args.data} @import '${o.args.path.replace(/\\/g, '\\\\').replace(/'/g, '\\\'')}';`;
o.args.path = undefined;
}