Comma separate left and right matcher in or matcher

This commit is contained in:
Kevin Sawicki
2013-08-07 18:20:41 -07:00
parent dffb0b35e7
commit de4e24582d
2 changed files with 3 additions and 2 deletions

View File

@@ -74,5 +74,6 @@ describe "TextMateScopeSelector", ->
expect(new TextMateScopeSelector('a - b').toCssSelector()).toBe '.a:not(.b)'
expect(new TextMateScopeSelector('a & b').toCssSelector()).toBe '.a .b'
expect(new TextMateScopeSelector('a & -b').toCssSelector()).toBe '.a:not(.b)'
expect(new TextMateScopeSelector('a | b').toCssSelector()).toBe '.a .b'
expect(new TextMateScopeSelector('a | b').toCssSelector()).toBe '.a, .b'
expect(new TextMateScopeSelector('a - (b.c d)').toCssSelector()).toBe '.a:not(.b.c .d)'
expect(new TextMateScopeSelector('a, b').toCssSelector()).toBe '.a, .b'

View File

@@ -58,7 +58,7 @@ class OrMatcher
matches: (scopes) -> @left.matches(scopes) or @right.matches(scopes)
toCssSelector: -> "#{@left.toCssSelector()} #{@right.toCssSelector()}"
toCssSelector: -> "#{@left.toCssSelector()}, #{@right.toCssSelector()}"
class AndMatcher
constructor: (@left, @right) ->