mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Only allow json and cson grammars
This commit is contained in:
@@ -39,14 +39,12 @@ class TextMatePackage extends Package
|
||||
grammar.deactivate() for grammar in @grammars
|
||||
atom.syntax.removeProperties(@path)
|
||||
|
||||
legalGrammarExtensions: ['plist', 'tmLanguage', 'tmlanguage', 'json', 'cson']
|
||||
|
||||
loadGrammars: ->
|
||||
deferred = Q.defer()
|
||||
fs.isDirectory @getSyntaxesPath(), (isDirectory) =>
|
||||
return deferred.resolve() unless isDirectory
|
||||
|
||||
fs.list @getSyntaxesPath(), @legalGrammarExtensions, (error, paths) =>
|
||||
fs.list @getSyntaxesPath(), ['json', 'cson'], (error, paths) =>
|
||||
if error?
|
||||
console.log("Error loading grammars of TextMate package '#{@path}':", error.stack, error)
|
||||
deferred.resolve()
|
||||
|
||||
Reference in New Issue
Block a user