mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use clear-cut library for specificity
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
_ = require 'underscore-plus'
|
||||
fsUtils = require './fs-utils'
|
||||
|
||||
Specificity = require '../vendor/specificity'
|
||||
{specificity} = require 'clear-cut'
|
||||
PEG = require 'pegjs'
|
||||
|
||||
### Internal ###
|
||||
@@ -19,7 +19,7 @@ class BindingSet
|
||||
|
||||
constructor: (selector, commandsByKeystrokes, @index, @name) ->
|
||||
BindingSet.parser ?= PEG.buildParser(fsUtils.read(require.resolve './keystroke-pattern.pegjs'))
|
||||
@specificity = Specificity(selector)
|
||||
@specificity = specificity(selector)
|
||||
@selector = selector.replace(/!important/g, '')
|
||||
@commandsByKeystrokes = @normalizeCommandsByKeystrokes(commandsByKeystrokes)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
_ = require 'underscore-plus'
|
||||
Specificity = require '../vendor/specificity'
|
||||
{specificity} = require 'clear-cut'
|
||||
{$, $$} = require './space-pen-extensions'
|
||||
fsUtils = require './fs-utils'
|
||||
{Emitter} = require 'emissary'
|
||||
@@ -76,7 +76,7 @@ class Syntax
|
||||
name: name
|
||||
selector: selector,
|
||||
properties: properties,
|
||||
specificity: Specificity(selector),
|
||||
specificity: specificity(selector),
|
||||
index: @scopedPropertiesIndex++
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user