See #524 and #543. Add no_lead_zero to CSS with Pretty Diff support

This commit is contained in:
Glavin Wiechert 2015-09-10 16:05:19 -03:00
parent b7ea432cea
commit 795d18de90
3 changed files with 54 additions and 1 deletions

View File

@ -471,6 +471,30 @@ If lists of assignments or properties should be vertically aligned for faster an
} }
``` ```
#### [CSS - No lead zero](#css---no-lead-zero)
**Namespace**: `css`
**Key**: `no_lead_zero`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
If in CSS values leading 0s immediately preceeding a decimal should be removed or prevented. (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"no_lead_zero": false
}
}
```
#### [D - Config Path](#d---config-path) #### [D - Config Path](#d---config-path)
**Namespace**: `d` **Namespace**: `d`
@ -5531,6 +5555,30 @@ If lists of assignments or properties should be vertically aligned for faster an
} }
``` ```
#### [CSS - No lead zero](#css---no-lead-zero)
**Namespace**: `css`
**Key**: `no_lead_zero`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
If in CSS values leading 0s immediately preceeding a decimal should be removed or prevented. (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"no_lead_zero": false
}
}
```
#### [HTML - Indent size](#html---indent-size) #### [HTML - Indent size](#html---indent-size)
**Namespace**: `html` **Namespace**: `html`

View File

@ -27,6 +27,7 @@ module.exports = class PrettyDiff extends Beautifier
] ]
wrap: "wrap_line_length" wrap: "wrap_line_length"
space: "space_after_anon_function" space: "space_after_anon_function"
noleadzero: "no_lead_zero"
# Apply language-specific options # Apply language-specific options
CSV: true CSV: true
ERB: true ERB: true

View File

@ -78,5 +78,9 @@ module.exports = {
default: false default: false
description: "If lists of assignments or properties should be \ description: "If lists of assignments or properties should be \
vertically aligned for faster and easier reading." vertically aligned for faster and easier reading."
no_lead_zero:
type: 'boolean'
default: false
description: "If in CSS values leading 0s immediately preceeding \
a decimal should be removed or prevented."
} }