Rename grammarByShebang to grammarByFirstLineRegex

A bundle's firstLineRegex value is used for more than
just shebang matches such as in the plist bundle.
This commit is contained in:
Kevin Sawicki
2013-01-08 16:01:41 -08:00
parent 131708ba37
commit 1872335adf

View File

@@ -28,7 +28,7 @@ class Syntax
extension = fs.base(filePath)
@grammarsByFileType[extension] or
@grammarByShebang(filePath) or
@grammarByFirstLineRegex(filePath) or
@grammarByFileTypeSuffix(filePath) or
@grammarsByFileType["txt"]
@@ -36,7 +36,7 @@ class Syntax
for fileType, grammar of @grammarsByFileType
return grammar if _.endsWith(filePath, fileType)
grammarByShebang: (filePath) ->
grammarByFirstLineRegex: (filePath) ->
try
fileContents = fs.read(filePath)
catch e