From 7c2ca2d6475628cfbd02a1f79a862231365e4fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Lef=C3=A8vre?= Date: Tue, 8 Sep 2015 21:55:25 +0200 Subject: [PATCH 1/2] Add JSBeautify extra_liners option in Settings View --- src/languages/html.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/languages/html.coffee b/src/languages/html.coffee index fb93332..8ced3b7 100644 --- a/src/languages/html.coffee +++ b/src/languages/html.coffee @@ -82,5 +82,11 @@ module.exports = { type: 'boolean' default: false description: "End output with newline" + extra_liners: + type: 'array' + default: ['head', 'body', '/html'] + items: + type: 'string' + description: "List of tags (defaults to [head,body,/html] that should have an extra newline before them." } From 3892e2a9d7c571d951e1fcf4a9fc370cf9397538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Lef=C3=A8vre?= Date: Wed, 9 Sep 2015 00:47:30 +0200 Subject: [PATCH 2/2] Update documentation for extra_liners option --- docs/options.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/docs/options.md b/docs/options.md index 4f6b169..5ea419b 100644 --- a/docs/options.md +++ b/docs/options.md @@ -916,6 +916,36 @@ End output with newline (Supported by JS Beautify) } ``` +#### [HTML - Extra liners](#html---extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + #### [Java - Config Path](#java---config-path) **Namespace**: `java` @@ -4856,6 +4886,36 @@ End output with newline (Supported by JS Beautify) } ``` +#### [HTML - Extra liners](#html---extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + #### [JavaScript - Indent size](#javascript---indent-size) **Namespace**: `js`