Skip to content

Commit

Permalink
added closingBracketNewLine formatting option to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Chen committed Jun 17, 2021
1 parent dd99f92 commit 5337621
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/Formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,22 @@ If it is set to `true`, the above document becomes:
<child />
</robot>
```
***
***
### xml.format.closingBracketNewLine

If set to `true`, the closing bracket (`>` or `/>`) of a tag with at least 2 attributes will be put on a new line.

Requires [splitAttributes](#xml.format.splitAttributes) to be set to `true`.

Defaults to `false`.

```xml
<a b="" c="" />
```
becomes
```xml
<a
b=""
c=""
/>
```
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@
"default": 2,
"markdownDescription": "How many levels to indent the attributes by when `#xml.format.splitAttributes#` is `true`. Default value is `2`. See [here](command:xml.open.docs?%5B%7B%22page%22%3A%22Formatting%22%2C%22section%22%3A%22xmlformatsplitattributesindentsize%22%7D%5D) for more information"
},
"xml.format.closingBracketNewLine": {
"type": "boolean",
"default": false,
"markdownDescription": "The option to put a closing tag on a newline when `#xml.format.splitAttributes#` is `true`. Default value is `true`. See [here](command:xml.open.docs?%5B%7B%22page%22%3A%22Formatting%22%2C%22section%22%3A%22xmlformatclosingbracketnewline%22%7D%5D) for more information."
},
"xml.preferences.quoteStyle": {
"type": "string",
"enum": [
Expand Down

0 comments on commit 5337621

Please sign in to comment.