colorpicker shouldn't overwrite non-colors

This commit is contained in:
tophf 2017-11-22 17:36:11 +03:00
parent 44206ef166
commit 607160655d

View File

@ -237,6 +237,10 @@
start++; start++;
(color = lineTextLC.slice(start, end)); (color = lineTextLC.slice(start, end));
colorValue = NAMED_COLORS.get(color); colorValue = NAMED_COLORS.get(color);
if (!colorValue) {
start = ch;
color = '';
}
} }
return color && {ch: start, color, colorValue}; return color && {ch: start, color, colorValue};
} }