mirror of
https://github.com/atom/atom.git
synced 2026-02-07 21:25:05 -05:00
Don't assign text grammar by default. Just use the null grammar.
This commit is contained in:
@@ -43,12 +43,10 @@ class TextMateGrammar
|
||||
contents = fsUtils.read(path) if not contents? and fsUtils.isFile(path)
|
||||
|
||||
if syntax.grammarOverrideForPath(path) is @scopeName
|
||||
Infinity
|
||||
else if @matchesContents(contents)
|
||||
3
|
||||
else if @matchesPath(path)
|
||||
else if @matchesContents(contents)
|
||||
2
|
||||
else if @isTextGrammar()
|
||||
else if @matchesPath(path)
|
||||
1
|
||||
else
|
||||
-1
|
||||
@@ -78,9 +76,6 @@ class TextMateGrammar
|
||||
pathSuffix = pathComponents[-fileTypeComponents.length..-1]
|
||||
_.isEqual(pathSuffix, fileTypeComponents)
|
||||
|
||||
isTextGrammar: ->
|
||||
@scopeName is 'text.plain'
|
||||
|
||||
tokenizeLine: (line, ruleStack=[@initialRule], firstLine=false) ->
|
||||
originalRuleStack = ruleStack
|
||||
ruleStack = new Array(ruleStack...) # clone ruleStack
|
||||
|
||||
Reference in New Issue
Block a user