kopia lustrzana https://github.com/c9/core
handle broken colors in theme importer
rodzic
7c55a315dd
commit
d13dc1fd3d
|
@ -137,7 +137,7 @@ var supportedModes = {
|
||||||
Protobuf: ["proto"],
|
Protobuf: ["proto"],
|
||||||
Python: ["py"],
|
Python: ["py"],
|
||||||
R: ["r"],
|
R: ["r"],
|
||||||
Razor: ["cshtml"],
|
Razor: ["cshtml|asp"],
|
||||||
RDoc: ["Rd"],
|
RDoc: ["Rd"],
|
||||||
RHTML: ["Rhtml"],
|
RHTML: ["Rhtml"],
|
||||||
RST: ["rst"],
|
RST: ["rst"],
|
||||||
|
|
|
@ -176,6 +176,8 @@ function luma(color) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseColor(color) {
|
function parseColor(color) {
|
||||||
|
if (color[0] != "#" && color.match(/^[a-f\d]+$/i))
|
||||||
|
color = "#" + color;
|
||||||
if (color.length == 4)
|
if (color.length == 4)
|
||||||
color = color.replace(/[a-fA-F\d]/g, "$&$&");
|
color = color.replace(/[a-fA-F\d]/g, "$&$&");
|
||||||
if (color.length == 7)
|
if (color.length == 7)
|
||||||
|
|
Ładowanie…
Reference in New Issue