diff --git a/docs/Formatting.md b/docs/Formatting.md index e123f109..2129e907 100644 --- a/docs/Formatting.md +++ b/docs/Formatting.md @@ -395,4 +395,22 @@ If it is set to `true`, the above document becomes: ``` -*** \ No newline at end of file +*** +### 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 + +``` +becomes +```xml + +``` \ No newline at end of file diff --git a/package.json b/package.json index 1dab38ff..4f91a94c 100644 --- a/package.json +++ b/package.json @@ -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": [