Skip to content

Commit

Permalink
Merge pull request #726 from joshholl/master
Browse files Browse the repository at this point in the history
See #524. Added pretty diff ternaryline option
  • Loading branch information
Glavin001 committed Feb 20, 2016
2 parents 0dfaefd + a6410d5 commit bdcccf8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,30 @@ Break chained method calls across subsequent lines (Supported by JS Beautify, Pr
}
```

#### [JavaScript - Preserve Ternary On Single Line](#javascript---preserve-ternary-lines)

**Namespace**: `js`

**Key**: `preserve_ternary_lines`

**Type**: `boolean`

**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)

**Description**:

Preserve ternary methods on a single line (Supported by JS Beautify, Pretty Diff)

**Example `.jsbeautifyrc` Configuration**

```json
{
"js": {
"preserve_ternary_lines": true
}
}
```

#### [JavaScript - Keep array indentation](#javascript---keep-array-indentation)

**Namespace**: `js`
Expand Down
1 change: 1 addition & 0 deletions src/beautifiers/prettydiff.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = class PrettyDiff extends Beautifier
if (break_chained_methods is true ) then \
false else true
]
ternaryline: "preserve_ternary_lines"
# Apply language-specific options
CSV: true
Coldfusion: true
Expand Down

0 comments on commit bdcccf8

Please sign in to comment.