Fixed a eol bug
This commit is contained in:
parent
c61af06452
commit
bdf889e14f
|
@ -451,7 +451,7 @@ function loadThemes() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var theme = _fs.readFileSync(themePath + fileName, 'utf8');
|
var theme = _fs.readFileSync(themePath + fileName, 'utf8');
|
||||||
var split = theme.split(_eol);
|
var split = theme.split("\n");
|
||||||
var meta = split[0];
|
var meta = split[0];
|
||||||
if(meta.indexOf('META') < 0) {
|
if(meta.indexOf('META') < 0) {
|
||||||
getUtils().warn("Theme META not found in file: " + fileName);
|
getUtils().warn("Theme META not found in file: " + fileName);
|
||||||
|
@ -488,7 +488,7 @@ function loadThemes() {
|
||||||
|
|
||||||
getUtils().log("Loading theme: " + themeInfo['name']);
|
getUtils().log("Loading theme: " + themeInfo['name']);
|
||||||
split.splice(0, 1);
|
split.splice(0, 1);
|
||||||
theme = split.join(_eol);
|
theme = split.join("\n");
|
||||||
theme = theme.replace(/(\r\n|\n|\r)/gm, '');
|
theme = theme.replace(/(\r\n|\n|\r)/gm, '');
|
||||||
|
|
||||||
_mainWindow.webContents.executeJavaScript('(function() { bdthemes["' + themeInfo['name'] + '"] = { "enabled": false, "name": "' + themeInfo['name'] + '", "css": "' + escape(theme) + '", "description": "' + themeInfo['description'] + '", "author":"' + themeInfo['author'] + '", "version":"' + themeInfo['version'] + '" } })();');
|
_mainWindow.webContents.executeJavaScript('(function() { bdthemes["' + themeInfo['name'] + '"] = { "enabled": false, "name": "' + themeInfo['name'] + '", "css": "' + escape(theme) + '", "description": "' + themeInfo['description'] + '", "author":"' + themeInfo['author'] + '", "version":"' + themeInfo['version'] + '" } })();');
|
||||||
|
|
Loading…
Reference in New Issue