Skip to content

Commit

Permalink
Update documentation of brace style options (related to #538 and #554)
Browse files Browse the repository at this point in the history
  • Loading branch information
c32hedge committed Oct 7, 2014
1 parent 54ca21b commit 0ec58cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Beautifier Options:
-P, --space-in-paren Add padding spaces within paren, ie. f( a, b )
-j, --jslint-happy Enable jslint-stricter mode
-a, --space_after_anon_function Add a space before an anonymous function's parens, ie. function ()
-b, --brace-style [collapse|expand|end-expand] ["collapse"]
-b, --brace-style [collapse|expand|end-expand|none] ["collapse"]
-B, --break-chained-methods Break chained method calls across subsequent lines
-k, --keep-array-indentation Preserve array indentation
-x, --unescape-strings Decode printable characters encoded in xNN notation
Expand Down Expand Up @@ -158,7 +158,7 @@ HTML Beautifier Options:
-I, --indent-inner-html Indent <head> and <body> sections. Default is false.
-s, --indent-size Indentation size [4]
-c, --indent-char Indentation character [" "]
-b, --brace-style [collapse|expand|end-expand] ["collapse"]
-b, --brace-style [collapse|expand|end-expand|none] ["collapse"]
-S, --indent-scripts [keep|separate|normal] ["normal"]
-w, --wrap-line-length Maximum characters per line (0 disables) [250]
-p, --preserve-newlines Preserve existing line-breaks (--no-preserve-newlines disables)
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@
<option value="collapse">Braces with control statement</option>
<option value="expand">Braces on own line</option>
<option value="end-expand">End braces on own line</option>
<option value="none">Attempt to keep braces where
they are</option>
</select>

<p style="margin:6px 0 0 0">HTML &lt;style&gt;, &lt;script&gt; formatting:</p>
Expand Down
4 changes: 2 additions & 2 deletions js/lib/beautify-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
indent_size (default 4) — indentation size,
indent_char (default space) — character to indent with,
wrap_line_length (default 250) - maximum amount of characters per line (0 = disable)
brace_style (default "collapse") - "collapse" | "expand" | "end-expand"
put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line.
brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none"
put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted
indent_scripts (default normal) - "keep"|"separate"|"normal"
preserve_newlines (default true) - whether existing line breaks before elements should be preserved
Expand Down

0 comments on commit 0ec58cd

Please sign in to comment.