-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments don't follow tabs indent style #1343
Comments
@J05HM0N5TER feel free to weigh in on the comment I left in #1344. Not sure if either of the two alternatives would be better than the fix I implemented. |
I think that looks like a great way to resolve it. I think if the user puts 4 spaces with indenting it will format the same as a tab anyway, and it will keep the indenting more consistent. This also means that if the user wants to have 1–3 spaces of indenting, like if they have something that they intend to line up with something on another line, then they can do that. Thank you for creating a fix for this so quickly. |
belav#1344) …ments into spaces. closes belav#1343
When formatting the document, any comments which have indenting, get updated to use space indenting, even when indent style is set to tabs. The indenting provided by the function is kept, but the extra indenting from the comment is spaces. This makes the indenting in this example
[tab][tab][space][space][space][space]
instead of[tab][tab][tab]
.I found out this problem because VS Code highlights lines with inconsistent indenting, and I was writing pseudocode in a comment block. I apologise for the awful looking formatting, but it is the best way I could find to demonstrate the problem.
Input:
Output:
Expected behavior:
The text was updated successfully, but these errors were encountered: