mirror of
https://github.com/atom/atom.git
synced 2026-02-09 14:15:24 -05:00
Only allow bundle bias if a file type was matched
This commit is contained in:
@@ -46,7 +46,7 @@ class GrammarRegistry extends FirstMate.GrammarRegistry
|
||||
contents = fs.readFileSync(filePath, 'utf8') if not contents? and fs.isFileSync(filePath)
|
||||
|
||||
score = @getGrammarPathScore(grammar, filePath)
|
||||
if not grammar.bundledPackage
|
||||
if score > 0 and not grammar.bundledPackage
|
||||
score += 0.25
|
||||
if @grammarMatchesContents(grammar, contents)
|
||||
score += 0.125
|
||||
|
||||
Reference in New Issue
Block a user