From d13dc1fd3d670d1c5c38fa02451b481e13264e11 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 6 Jun 2016 03:21:00 +0400 Subject: [PATCH] handle broken colors in theme importer --- node_modules/ace/lib/ace/ext/modelist.js | 2 +- node_modules/ace/tool/tmtheme.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/node_modules/ace/lib/ace/ext/modelist.js b/node_modules/ace/lib/ace/ext/modelist.js index 13c1170f..a269e7a7 100644 --- a/node_modules/ace/lib/ace/ext/modelist.js +++ b/node_modules/ace/lib/ace/ext/modelist.js @@ -137,7 +137,7 @@ var supportedModes = { Protobuf: ["proto"], Python: ["py"], R: ["r"], - Razor: ["cshtml"], + Razor: ["cshtml|asp"], RDoc: ["Rd"], RHTML: ["Rhtml"], RST: ["rst"], diff --git a/node_modules/ace/tool/tmtheme.js b/node_modules/ace/tool/tmtheme.js index c784eec7..11e80e38 100755 --- a/node_modules/ace/tool/tmtheme.js +++ b/node_modules/ace/tool/tmtheme.js @@ -176,6 +176,8 @@ function luma(color) { } function parseColor(color) { + if (color[0] != "#" && color.match(/^[a-f\d]+$/i)) + color = "#" + color; if (color.length == 4) color = color.replace(/[a-fA-F\d]/g, "$&$&"); if (color.length == 7)