Fix space tab indentation#8487
Conversation
|
Hi @ziacik, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
| if (indentation !== tokenStart.character) { | ||
| let startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile); | ||
| let startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile); | ||
| if (indentation !== tokenStart.character || indentationIsDifferent(indentationString, startLinePosition)) { |
There was a problem hiding this comment.
why not just indentationString === soruceFile.text.substr(startLinePosition , indentationString.length);
|
Well, I guess I did some overengineering here, lol. Looking at the rest of the source code which does work with charcodes a lot maybe I thought it would be better to do it like that and maybe that it would have a better performance than creating a substring. That's just a very blind guess, probably. I can change it to your way by another commit. |
|
the change looks good to me. if you can get that comparison simplified we should be good to go. thanks for taking the time to fix this issue. |
|
I have added the simplification commit. |
|
thanks! |
Fixes #8426
Pls review and merge if possible. The issue hasn't been labeled yet.