mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 00:31:21 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
f0e2ea8598
3 changed files with 9 additions and 11 deletions
Binary file not shown.
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 43 KiB |
|
@ -7,7 +7,8 @@ Campaign = require 'models/Campaign'
|
|||
CocoCollection = require 'collections/CocoCollection'
|
||||
Campaigns = require 'collections/Campaigns'
|
||||
Levels = require 'collections/Levels'
|
||||
parser = new esper().realm.parser
|
||||
unless typeof esper is 'undefined'
|
||||
parser = new esper().realm.parser
|
||||
|
||||
module.exports = class LevelConceptMap extends RootView
|
||||
template: template
|
||||
|
|
|
@ -140,16 +140,6 @@ module.exports = (SnippetManager, autoLineEndings) ->
|
|||
@completions = completions
|
||||
return callback null, completions
|
||||
|
||||
#If the prefix is a reserved word, make enter just complete it
|
||||
keywords = session.getMode()?.$highlightRules?.$keywordList
|
||||
if keywords and prefix in keywords
|
||||
completions.push
|
||||
content: prefix
|
||||
caption: prefix
|
||||
snippet: prefix + "\n"
|
||||
score: 100
|
||||
meta: '\u21E5'
|
||||
|
||||
snippetMap = SnippetManager.snippetMap
|
||||
|
||||
SnippetManager.getActiveScopes(editor).forEach (scope) ->
|
||||
|
@ -165,6 +155,13 @@ module.exports = (SnippetManager, autoLineEndings) ->
|
|||
score: fuzzScore * s.importance ? 1.0
|
||||
meta: s.meta or (if s.tabTrigger and not s.name then s.tabTrigger + '\u21E5' else 'snippets')
|
||||
, @
|
||||
|
||||
#If the prefix is a reserved word, only exact prefix snippets match
|
||||
keywords = session.getMode()?.$highlightRules?.$keywordList
|
||||
if keywords and prefix in keywords
|
||||
@completions = _.filter(completions, (x) -> x.caption.indexOf prefix is 0)
|
||||
return callback null, @completions
|
||||
|
||||
# console.log 'Zatanna snippet completions', completions
|
||||
@completions = completions
|
||||
callback null, completions
|
||||
|
|
Loading…
Reference in a new issue