omz / ColorSense-for-Xcode

Plugin for Xcode to make working with colors more visual

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recognize colors even if there are line breaks

marcelofabri opened this issue · comments

If there are line breaks in the method call (to enhance readability) the plugin can't recognize it as a color.

I was able to achieve this, but I needed to remove the code that performs the regular expressions on the selected line. It now needs to search the all source code string.

Testing on my computer (a 15" Macbook Pro w/ Retina), I didn't notice any performances issues here, but I'm afraid this should be tested more. Maybe have an option on the menu, so it can be disabled if it's necessary.

Can you make a pull request with your change? Perhaps we can work together to simplify the work it does.