mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-23 20:59:43 +00:00
wording
This commit is contained in:
parent
ed10ea92c4
commit
8f158ecf2a
@ -169,7 +169,7 @@ HTML Beautifier Options:
|
|||||||
-m, --max-preserve-newlines Maximum number of line-breaks to be preserved in one chunk [10]
|
-m, --max-preserve-newlines Maximum number of line-breaks to be preserved in one chunk [10]
|
||||||
-U, --unformatted List of tags (defaults to inline) that should not be reformatted
|
-U, --unformatted List of tags (defaults to inline) that should not be reformatted
|
||||||
-n, --end_with_newline End output with newline
|
-n, --end_with_newline End output with newline
|
||||||
-E, --extra_liners List of tags (defaults to inline) that should be followed by an extra newline
|
-E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline before them.
|
||||||
```
|
```
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk
|
max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk
|
||||||
indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}
|
indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}
|
||||||
end_with_newline (false) - end with a newline
|
end_with_newline (false) - end with a newline
|
||||||
extra_liners (default ['html', 'head', '/html']) - add an extra newline after these tags
|
extra_liners (default [head,body,/html]) -List of tags that should have an extra newline before them.
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
@ -121,7 +121,9 @@
|
|||||||
: 0;
|
: 0;
|
||||||
indent_handlebars = (options.indent_handlebars === undefined) ? false : options.indent_handlebars;
|
indent_handlebars = (options.indent_handlebars === undefined) ? false : options.indent_handlebars;
|
||||||
end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline;
|
end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline;
|
||||||
extra_liners = Array.isArray(options.extra_liners) ? options.extra_liners : 'head,body,/html'.split(',');
|
extra_liners = Array.isArray(options.extra_liners) ?
|
||||||
|
options.extra_liners : (typeof options.extra_liners === 'string') ?
|
||||||
|
options.extra_liners.split(',') : 'head,body,/html'.split(',');
|
||||||
function Parser() {
|
function Parser() {
|
||||||
|
|
||||||
this.pos = 0; //Parser position
|
this.pos = 0; //Parser position
|
||||||
|
@ -242,7 +242,7 @@ function usage(err) {
|
|||||||
msg.push(' -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)');
|
msg.push(' -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)');
|
||||||
msg.push(' -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]');
|
msg.push(' -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]');
|
||||||
msg.push(' -U, --unformatted List of tags (defaults to inline) that should not be reformatted');
|
msg.push(' -U, --unformatted List of tags (defaults to inline) that should not be reformatted');
|
||||||
msg.push(' -E, --extra_liners List of tags (defaults to inline) that should be followed by an extra newline');
|
msg.push(' -E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline');
|
||||||
break;
|
break;
|
||||||
case "css":
|
case "css":
|
||||||
msg.push(' -L, --selector-separator-newline Add a newline between multiple selectors.')
|
msg.push(' -L, --selector-separator-newline Add a newline between multiple selectors.')
|
||||||
|
Loading…
Reference in New Issue
Block a user