Merge pull request #1644 from UziTech/patch-1
fix `undefined` when options has no description
This commit is contained in:
commit
5d2e707434
|
@ -7074,7 +7074,7 @@ Automatically beautify LaTeX files on save
|
|||
|
||||
**Description**:
|
||||
|
||||
undefined (Supported by Latex Beautify)
|
||||
(Supported by Latex Beautify)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -8945,7 +8945,7 @@ Automatically beautify Nginx files on save
|
|||
|
||||
**Description**:
|
||||
|
||||
undefined (Supported by Nginx Beautify)
|
||||
(Supported by Nginx Beautify)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -9706,7 +9706,7 @@ Absolute path to the `php-cs-fixer` CLI executable (Supported by PHP-CS-Fixer)
|
|||
|
||||
**Description**:
|
||||
|
||||
undefined (Supported by PHP-CS-Fixer)
|
||||
(Supported by PHP-CS-Fixer)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -16757,7 +16757,7 @@ Remove trailing whitespace (Supported by Latex Beautify)
|
|||
|
||||
**Description**:
|
||||
|
||||
undefined (Supported by Latex Beautify)
|
||||
(Supported by Latex Beautify)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -17311,7 +17311,7 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by N
|
|||
|
||||
**Description**:
|
||||
|
||||
undefined (Supported by Nginx Beautify)
|
||||
(Supported by Nginx Beautify)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -17366,7 +17366,7 @@ Absolute path to the `php-cs-fixer` CLI executable (Supported by PHP-CS-Fixer)
|
|||
|
||||
**Description**:
|
||||
|
||||
undefined (Supported by PHP-CS-Fixer)
|
||||
(Supported by PHP-CS-Fixer)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
|
|
@ -133,9 +133,9 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
|
|||
return _.reduce(languageOptions, (function(result, optionDef, optionName) {
|
||||
optionDef.beautifiers = _.uniq(optionDef.beautifiers)
|
||||
if (optionDef.beautifiers.length > 0) {
|
||||
optionDef.description = optionDef.description + " (Supported by " + (optionDef.beautifiers.join(', ')) + ")";
|
||||
optionDef.description = (optionDef.description || "") + " (Supported by " + (optionDef.beautifiers.join(', ')) + ")";
|
||||
} else {
|
||||
optionDef.description = optionDef.description + " (Not supported by any beautifiers)";
|
||||
optionDef.description = (optionDef.description || "") + " (Not supported by any beautifiers)";
|
||||
}
|
||||
if (result[optionName] != null) {
|
||||
logger.warn("Duplicate option detected: ", optionName, optionDef);
|
||||
|
@ -322,7 +322,7 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
|
|||
optionDef = ref16[o];
|
||||
optionDef.beautifiers = _.uniq(optionDef.beautifiers)
|
||||
if (optionDef.beautifiers.length > 0) {
|
||||
optionDef.description = optionDef.description + " (Supported by " + (optionDef.beautifiers.join(', ')) + ")";
|
||||
optionDef.description = (optionDef.description || "") + " (Supported by " + (optionDef.beautifiers.join(', ')) + ")";
|
||||
} else {
|
||||
unsupportedOptions.push(g + ".properties." + o);
|
||||
}
|
||||
|
|
|
@ -4301,7 +4301,7 @@
|
|||
"name": "LaTeX",
|
||||
"namespace": "latex"
|
||||
},
|
||||
"description": "undefined (Supported by Latex Beautify)"
|
||||
"description": " (Supported by Latex Beautify)"
|
||||
},
|
||||
"disabled": {
|
||||
"title": "Disable Beautifying Language",
|
||||
|
@ -5420,7 +5420,7 @@
|
|||
"name": "Nginx",
|
||||
"namespace": "nginx"
|
||||
},
|
||||
"description": "undefined (Supported by Nginx Beautify)"
|
||||
"description": " (Supported by Nginx Beautify)"
|
||||
},
|
||||
"disabled": {
|
||||
"title": "Disable Beautifying Language",
|
||||
|
@ -5808,7 +5808,7 @@
|
|||
"name": "PHP",
|
||||
"namespace": "php"
|
||||
},
|
||||
"description": "undefined (Supported by PHP-CS-Fixer)"
|
||||
"description": " (Supported by PHP-CS-Fixer)"
|
||||
},
|
||||
"fixers": {
|
||||
"type": "string",
|
||||
|
|
Loading…
Reference in New Issue