mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Allow + characters in selector segments
This commit is contained in:
@@ -16,6 +16,8 @@ describe "TextMateScopeSelector", ->
|
||||
expect(new TextMateScopeSelector('a').matches(['abc'])).toBeFalsy()
|
||||
expect(new TextMateScopeSelector('a.b-c').matches(['a.b-c.d'])).toBeTruthy()
|
||||
expect(new TextMateScopeSelector('a.b').matches(['a.b-d'])).toBeFalsy()
|
||||
expect(new TextMateScopeSelector('c++').matches(['c++'])).toBeTruthy()
|
||||
expect(new TextMateScopeSelector('c++').matches(['c'])).toBeFalsy()
|
||||
|
||||
it "matches disjunction", ->
|
||||
expect(new TextMateScopeSelector('a | b').matches(['b'])).toBeTruthy()
|
||||
|
||||
@@ -7,7 +7,7 @@ start = _ selector:(selector) _ {
|
||||
}
|
||||
|
||||
segment
|
||||
= _ segment:([a-zA-Z0-9]+[a-zA-Z0-9-]*) _ {
|
||||
= _ segment:([a-zA-Z0-9+]+[a-zA-Z0-9-+]*) _ {
|
||||
return new matchers.SegmentMatcher(segment);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user