forked from external/vscode-xml
		
	Merge pull request #317 from abeMedia/patch-1
fix: prevent negative indentation
This commit is contained in:
		
						commit
						343fb2c043
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -291,7 +291,7 @@ export class V2XmlFormatter implements XmlFormatter {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private _getIndent(options: XmlFormattingOptions, indentLevel: number): string {
 | 
					    private _getIndent(options: XmlFormattingOptions, indentLevel: number): string {
 | 
				
			||||||
        return ((options.editorOptions.insertSpaces) ? " ".repeat(options.editorOptions.tabSize) : "\t").repeat(indentLevel);
 | 
					        return ((options.editorOptions.insertSpaces) ? " ".repeat(options.editorOptions.tabSize) : "\t").repeat(Math.max(indentLevel, 0));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private _removeTrailingNonBreakingWhitespace(text: string): string {
 | 
					    private _removeTrailingNonBreakingWhitespace(text: string): string {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue