forked from external/vscode-xml
parent
07b47c4748
commit
156e1ab435
5 changed files with 25 additions and 0 deletions
|
|
@ -135,6 +135,14 @@ export class V2XmlFormatter implements XmlFormatter {
|
|||
location = Location.StartTag;
|
||||
}
|
||||
|
||||
// approaching the end of a self-closing tag where there was no whitespace (issue #149)
|
||||
else if ((location === Location.StartTag || location === Location.StartTagName)
|
||||
&& cc === "/"
|
||||
&& pc !== " "
|
||||
&& options.enforcePrettySelfClosingTagOnFormat) {
|
||||
output += " /";
|
||||
}
|
||||
|
||||
// exiting StartTag or StartTag.StartTagName, entering Text
|
||||
else if ((location === Location.StartTag || location === Location.StartTagName) && cc === ">") {
|
||||
// if this was a self-closing tag, we need to decrement the indent level and add a newLine
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue