Fix bug with regex and extensions with dashes
Fix bug with regex and extensions with dashes

Should a file extension with a dash exist (for example, ".rbenv-vars", or ".ruby-version") the regex that clears the element's filetype-color- class would not properly clear all of it. For example, this would result, on multiple toggles of the package using ctrl-alt-cmd-b, in the following:

toggle on: class="name icon icon-file-text filetype-color-ruby-version"
toggle off: class="name icon icon-file-text-version"
toggle on: class="name icon icon-file-text-version filetype-color-ruby-version"
toggle off: class="name icon icon-file-text-version-version"

etc.

The regex has been corrected to remove everything after "filetype-color-" until it encounters the end of the class name (a whitespace character): http://cl.ly/image/2j1O2v3W1v2M
sommerper/filetype-color