mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
decodeContent -> decodeTokens
This commit is contained in:
@@ -4114,7 +4114,7 @@ describe "TextEditor", ->
|
||||
grammar = atom.grammars.selectGrammar("text.js")
|
||||
{line, tags} = grammar.tokenizeLine("var i; // http://github.com")
|
||||
|
||||
tokens = atom.grammars.decodeContent(line, tags)
|
||||
tokens = atom.grammars.decodeTokens(line, tags)
|
||||
expect(tokens[0].value).toBe "var"
|
||||
expect(tokens[0].scopes).toEqual ["source.js", "storage.modifier.js"]
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ class TokenizedLine
|
||||
Object.defineProperty @prototype, 'tokens', get: ->
|
||||
offset = 0
|
||||
|
||||
atom.grammars.decodeContent @text, @tags, @parentScopes.slice(), (tokenProperties, index) =>
|
||||
atom.grammars.decodeTokens @text, @tags, @parentScopes.slice(), (tokenProperties, index) =>
|
||||
switch @specialTokens[index]
|
||||
when SoftTab
|
||||
tokenProperties.isAtomic = true
|
||||
|
||||
Reference in New Issue
Block a user