See #713. Include options from language's fallback

This commit is contained in:
Glavin Wiechert 2016-03-21 11:00:12 -03:00
parent 48718d532c
commit bc8c2a835b
1 changed files with 10 additions and 0 deletions

View File

@ -139,6 +139,16 @@ module.exports = class Beautifiers extends EventEmitter
# Add option
options[field] = op
# Language fallback options
for lang in @languages.languages
# Use the namespace from language as key prefix
namespaceDest = lang.namespace
optionsDest = _.get(langOptions, "#{namespaceDest}.properties")
fallback = _.reverse(lang.fallback ? [])
for namespaceSrc in fallback
optionsSrc = _.get(langOptions, "#{namespaceSrc}.properties")
_.merge(optionsDest, optionsSrc)
# Find supported beautifiers for each language
for beautifier in beautifiers
beautifierName = beautifier.name