Fix built-options and docs script adding duplicate beautifiers
This commit is contained in:
parent
c0b3ba3557
commit
1009945b8a
|
@ -394,7 +394,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
|||
|
||||
#### [Coldfusion](#coldfusion)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -1268,7 +1268,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
|||
|
||||
#### [CSS](#css)
|
||||
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`CSScomb`](#csscomb) [`JS Beautify`](#js-beautify) [`JS Beautify`](#js-beautify) [`JS Beautify`](#js-beautify) [`JS Beautify`](#js-beautify) [`JS Beautify`](#js-beautify) [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -1657,7 +1657,7 @@ Maximum amount of characters per line (0 = disable) (Supported by JS Beautify, P
|
|||
|
||||
#### [CSV](#csv)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -1807,7 +1807,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
|||
|
||||
#### [EJS](#ejs)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -2109,7 +2109,7 @@ Automatically beautify Elm files on save
|
|||
|
||||
#### [ERB](#erb)
|
||||
|
||||
**Supported Beautifiers**: [`HTML Beautifier`](#html-beautifier) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`HTML Beautifier`](#html-beautifier) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -2628,7 +2628,7 @@ Automatically beautify Go files on save
|
|||
|
||||
#### [Handlebars](#handlebars)
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -2659,7 +2659,7 @@ Disable Handlebars Beautification
|
|||
|
||||
**Type**: `string`
|
||||
|
||||
**Enum**: `JS Beautify`
|
||||
**Enum**: `JS Beautify` `Pretty Diff`
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -2781,11 +2781,11 @@ List of tags (defaults to [head,body,/html] that should have an extra newline be
|
|||
|
||||
**Type**: `string`
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
Indentation character (Supported by JS Beautify)
|
||||
Indentation character (Supported by JS Beautify, Pretty Diff)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -2859,11 +2859,11 @@ Indent <head> and <body> sections. (Supported by JS Beautify)
|
|||
|
||||
**Type**: `integer`
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
Indentation size/length (Supported by JS Beautify)
|
||||
Indentation size/length (Supported by JS Beautify, Pretty Diff)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -2911,11 +2911,11 @@ Number of line-breaks to be preserved in one chunk (Supported by JS Beautify)
|
|||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
Preserve line-breaks (Supported by JS Beautify)
|
||||
Preserve line-breaks (Supported by JS Beautify, Pretty Diff)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -3055,11 +3055,11 @@ Indent wrapped attributes to after N characters (Supported by JS Beautify)
|
|||
|
||||
**Type**: `integer`
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
Maximum characters per line (0 disables) (Supported by JS Beautify)
|
||||
Maximum characters per line (0 disables) (Supported by JS Beautify, Pretty Diff)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
|
@ -3136,7 +3136,7 @@ Automatically beautify Haskell files on save
|
|||
|
||||
#### [HTML](#html)
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -3581,7 +3581,7 @@ Maximum characters per line (0 disables) (Supported by JS Beautify, Pretty Diff)
|
|||
|
||||
#### [Jade](#jade)
|
||||
|
||||
**Supported Beautifiers**: [`Pug Beautify`](#pug-beautify) [`Pug Beautify`](#pug-beautify)
|
||||
**Supported Beautifiers**: [`Pug Beautify`](#pug-beautify)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -3783,7 +3783,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
|||
|
||||
#### [JavaScript](#javascript)
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`JSCS Fixer`](#jscs-fixer) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`JSCS Fixer`](#jscs-fixer) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -4316,7 +4316,7 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre
|
|||
|
||||
#### [JSON](#json)
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -4849,7 +4849,7 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre
|
|||
|
||||
#### [JSX](#jsx)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -5330,7 +5330,7 @@ Remove trailing whitespace (Supported by Latex Beautify)
|
|||
|
||||
#### [LESS](#less)
|
||||
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -5695,7 +5695,7 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
|
|||
|
||||
#### [Markdown](#markdown)
|
||||
|
||||
**Supported Beautifiers**: [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Remark`](#remark) [`Tidy Markdown`](#tidy-markdown)
|
||||
**Supported Beautifiers**: [`Remark`](#remark) [`Tidy Markdown`](#tidy-markdown)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -7398,7 +7398,7 @@ sort imports (requires isort installed) (Supported by autopep8)
|
|||
|
||||
#### [Riot.js](#riot.js)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -7565,7 +7565,7 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
|||
|
||||
#### [Ruby](#ruby)
|
||||
|
||||
**Supported Beautifiers**: [`Rubocop`](#rubocop) [`Rubocop`](#rubocop) [`Ruby Beautify`](#ruby-beautify) [`Ruby Beautify`](#ruby-beautify)
|
||||
**Supported Beautifiers**: [`Rubocop`](#rubocop) [`Ruby Beautify`](#ruby-beautify)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -7793,7 +7793,7 @@ Path to rustfmt program (Supported by rustfmt)
|
|||
|
||||
#### [Sass](#sass)
|
||||
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -8158,7 +8158,7 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
|
|||
|
||||
#### [SCSS](#scss)
|
||||
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -8523,7 +8523,7 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
|
|||
|
||||
#### [Spacebars](#spacebars)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -8835,7 +8835,7 @@ Change case of keywords (Supported by sqlformat)
|
|||
|
||||
#### [SVG](#svg)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -9002,7 +9002,7 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
|||
|
||||
#### [Swig](#swig)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -9169,7 +9169,7 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
|||
|
||||
#### [TSS](#tss)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -9482,7 +9482,7 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
|
|||
|
||||
#### [Twig](#twig)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -10341,7 +10341,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
|||
|
||||
#### [Visualforce](#visualforce)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -10508,7 +10508,7 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
|||
|
||||
#### [XML](#xml)
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
@ -10953,7 +10953,7 @@ Maximum characters per line (0 disables) (Supported by JS Beautify, Pretty Diff)
|
|||
|
||||
#### [XTemplate](#xtemplate)
|
||||
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff) [`Pretty Diff`](#pretty-diff)
|
||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
|
|
|
@ -129,6 +129,7 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
|
|||
allOptions = _.values(langOptions);
|
||||
flatOptions = _.reduce(allOptions, (function(result, languageOptions, language) {
|
||||
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(', ')) + ")";
|
||||
} else {
|
||||
|
@ -309,6 +310,7 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
|
|||
ref16 = group.properties;
|
||||
for (o in ref16) {
|
||||
optionDef = ref16[o];
|
||||
optionDef.beautifiers = _.uniq(optionDef.beautifiers)
|
||||
if (optionDef.beautifiers.length > 0) {
|
||||
optionDef.description = optionDef.description + " (Supported by " + (optionDef.beautifiers.join(', ')) + ")";
|
||||
} else {
|
||||
|
@ -324,7 +326,8 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
|
|||
lang = languages[langName];
|
||||
name = lang.name;
|
||||
namespace = lang.namespace;
|
||||
beautifiers = lang.beautifiers;
|
||||
beautifiers = (lang.beautifiers = _.uniq(lang.beautifiers));
|
||||
langOptions[namespace].beautifiers = beautifiers
|
||||
optionName = "language_" + namespace;
|
||||
_.set(langOptions, namespace + ".properties.disabled", {
|
||||
title: "Disable Beautifying Language",
|
||||
|
|
Loading…
Reference in New Issue