Merge pull request #157 from samuelthomas2774/escape-windows-paths

Escape SCSS import path
This commit is contained in:
Alexei Stukov 2018-03-06 00:40:32 +02:00 committed by GitHub
commit 626b6cec64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}