Open core-ai-bot opened 3 years ago
Comment by gruehle Tuesday Apr 23, 2013 at 19:47 GMT
Initial review complete. It would be nice to split the regex into multiple lines and move into a core file so it can be shared with InlineColorEditor.
Comment by redmunds Tuesday Apr 23, 2013 at 22:44 GMT
@
gruehle The color regex used by the InlineColorEditor does not have teh named colors. Is it OK if it does, or will that cause problems?
Comment by RaymondLim Tuesday Apr 23, 2013 at 23:07 GMT
I do have color regex in my branch rlim/improved-color-picker which construct a named color array from tinycolor library.
InlineColorEditor.colorNameArray = $.map(tinycolor.names, function (value, key) {
return "\\b" + key + "\\b";
});
Comment by gruehle Wednesday Apr 24, 2013 at 00:13 GMT
@
redmunds - it looks like some changes to StringUtils got added with your last commit. These are causing the Travis failure.
Comment by TomMalbran Wednesday Apr 24, 2013 at 00:18 GMT
The color regular expression was moved to the StringUtils as an array, but without the double escapes, which caused the JSHint error.
Comment by redmunds Wednesday Apr 24, 2013 at 02:13 GMT
I tried to break the color regex into an array of regexes, but I couldn't quite get it working, so I punted for now.
I implemented a small performance improvement: don't look for a color if we already have a gradient.
I fixed a couple more problems with color regex:
Copied changes to InlineColorEditor color regex (everything except named colors).
Ready for final review.
Comment by gruehle Wednesday Apr 24, 2013 at 02:39 GMT
Thanks for trying the regexp split. Too bad it didn't work out.
Everything else looks good.
Issue by redmunds Monday Apr 22, 2013 at 23:09 GMT Originally opened as https://github.com/adobe/brackets/pull/3540
The RegExp is difficult to diff, so here are my changes. I made 3 changes:
redmunds included the following code: https://github.com/adobe/brackets/pull/3540/commits