Home Download Buy Blog Forum Support

Scope selectors ranking matches - possible bug

Re: Scope selectors ranking matches - possible bug

Postby Jarry Dark on Tue Oct 13, 2009 5:56 am

Also, step 3 should be clever about cases like this one:

scope: a.b c.d e.f g.h

and selectors:
a.b c.d e g.h
a.b e.f g.h
Jarry Dark
 
Posts: 8
Joined: Thu Oct 08, 2009 12:45 pm

Re: Scope selectors ranking matches - possible bug

Postby jps on Tue Oct 13, 2009 11:25 am

This is indeed a bug, I've put it on the list of things to fix.

Internally, since selectors form a regular language, sublime transforms them into regexes. To rank selectors vs. a scope, it simply takes the selector with the leftmost longest match. This is an approximation of the TextMate ranking scheme, but it doesn't always rank in the same way - I'll need to change the ranking to be done in a per-scope element iterative method.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 29 guests