forked from external/vscode-xml
commit
668fa5894b
2 changed files with 9 additions and 4 deletions
|
@ -121,7 +121,7 @@
|
|||
"onCommand:xmlTools.viewXmlTree"
|
||||
],
|
||||
"devDependencies": {
|
||||
"vscode": "TrueCommerce/vscode-extension-vscode#519e686",
|
||||
"vscode": "^0.11.8",
|
||||
"typescript": "^1.6.2",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-shell": "^0.5.1"
|
||||
|
|
|
@ -83,10 +83,15 @@ export class XmlFormatter {
|
|||
}
|
||||
|
||||
// <elm />
|
||||
else if (parts[i].search(/\/>/) > -1) {
|
||||
else if (parts[i].search(/\/>/) > -1 && (!this.splitNamespaces || parts[i].search(/xmlns\:/) == -1)) {
|
||||
output = (!inComment) ? output += this._getIndent(level, parts[i]) : output += parts[i];
|
||||
}
|
||||
|
||||
// xmlns />
|
||||
else if (parts[i].search(/\/>/) > -1 && parts[i].search(/xmlns\:/) > -1 && this.splitNamespaces) {
|
||||
output = (!inComment) ? output += this._getIndent(level--, parts[i]) : output += parts[i];
|
||||
}
|
||||
|
||||
// <?xml ... ?>
|
||||
else if (parts[i].search(/<\?/) > -1) {
|
||||
output += this._getIndent(level, parts[i]);
|
||||
|
|
Loading…
Add table
Reference in a new issue