Skip to content

Commit

Permalink
🐛 Fix creating markers for invalid colors
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Jul 20, 2014
1 parent 65d8e27 commit dc204b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/atom-color-highlight-model.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class AtomColorHighlightModel
for res in results
{bufferRange: range, match, color} = res

continue if color.isInvalid

if marker = @findMarker(match, range)
if marker.bufferMarker.properties.cssColor isnt color.toCSS()
marker = @createMarker(match, color, range)
Expand Down
2 changes: 2 additions & 0 deletions spec/sample.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ list = red, green, blue, yellow, cyan, magenta
// #f0f

string = '#ff0000'

invalid_color = transparentize(stylus_red, inexistant_color)

0 comments on commit dc204b9

Please sign in to comment.