Remove unused methods from token.

The refactoring of Editor.buildLineHtml removed the need for these methods
This commit is contained in:
Corey Johnson
2012-10-01 14:38:47 -07:00
parent 34ded7d4e9
commit 8eb9d6629c
2 changed files with 1 additions and 17 deletions

View File

@@ -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()

View File

@@ -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