mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Remove unused methods from token.
The refactoring of Editor.buildLineHtml removed the need for these methods
This commit is contained in:
@@ -13,8 +13,4 @@ describe "Token", ->
|
||||
token = _.last(screenLine.tokens)
|
||||
|
||||
afterEach ->
|
||||
editSession.destroy()
|
||||
|
||||
describe ".getCssClassString()", ->
|
||||
it "returns a class for every scope prefix, replacing . characters in scope names with --", ->
|
||||
expect(token.getCssClassString()).toBe 'source source-js punctuation punctuation-terminator punctuation-terminator-statement punctuation-terminator-statement-js'
|
||||
editSession.destroy()
|
||||
@@ -32,15 +32,3 @@ class Token
|
||||
|
||||
buildTabToken: (tabText) ->
|
||||
new Token(value: tabText, scopes: @scopes, bufferDelta: 1, isAtomic: true)
|
||||
|
||||
getCssClassString: ->
|
||||
@cssClassString ?= @getCssClasses().join(' ')
|
||||
|
||||
getCssClasses: ->
|
||||
classes = []
|
||||
for scope in @scopes
|
||||
scopeComponents = scope.split('.')
|
||||
for i in [0...scopeComponents.length]
|
||||
classes.push scopeComponents[0..i].join('-')
|
||||
classes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user