Fixes #353. Fix support for extensions with getLanguages

This commit is contained in:
Glavin Wiechert 2015-05-20 13:37:47 -03:00
parent 60b86df3ba
commit 559c2ecbd7
1 changed files with 4 additions and 2 deletions

View File

@ -294,8 +294,10 @@ module.exports = class Beautifiers
# Get language
fileExtension = path.extname(filePath)
languages = @languages.getLanguages({grammar, fileExtension})
# Remove prefix "." (period) in fileExtension
fileExtension = fileExtension.substr(1)
languages = @languages.getLanguages({grammar, extension: fileExtension})
logger.verbose(languages, grammar, fileExtension)
# Check if unsupported language
if languages.length < 1