mirror of
				https://github.com/We-Dont-Byte/Mind_Reader.git
				synced 2025-02-04 10:38:42 +00:00 
			
		
		
		
	leading spaces alternative method
Added an alternative method for calculating the leading spaces instead of taking the index of the first non-whitespace character. Leaving it commented out, but still there as an alternative in-case something goes wrong w/ the index method.
This commit is contained in:
		@@ -82,6 +82,7 @@ function getLeadingSpaces() {
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            let numSpaces = textLine.firstNonWhitespaceCharacterIndex;
 | 
			
		||||
            // let numSpaces = textLine.text.length - textLine.text.trimStart().length; // Alternative method, same result by calculating the leading spaces 
 | 
			
		||||
            vscode.window.showInformationMessage("Line Number " + lineNum.toString() + " Has " + numSpaces.toString()+ " Leading Spaces ");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user