-
Notifications
You must be signed in to change notification settings - Fork 513
Format Document: Changes Tabs for Spaces #1466
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
Hi @midacts, can you execute the following command to see if you get the same result: > Invoke-Formatter (Get-Content -Raw ./path/to/your/script.ps1) > output.ps1 If |
Running the above command turned all tabs into spaces and saved the file as UTF-16 LE. I did notice, in examples like PSCustomObjects, it didnt replaces all spaces with tabs, maybe 1+ of the tabs stayed a tab and all the rest were changed to spaces. QuestionWhat would next steps be? |
Thanks for the great lead. Running I made my own codeformatting.psd1 file and it did use tabs EXCEPT in the case of key/value pairs. It converted to spaces between the key and the equal sign. |
Thanks for doing that! I'll close this now since it's a Script Analyzer issue. Let me know if you feel otherwise! 👍 |
Uh oh!
There was an error while loading. Please reload this page.
System Details
$PSVersionTable
:Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:
Issue Description
I am using PowerShell.
I have lines of code link this which are key value pairs
After running Right click -> Format document, it replaces the tabs with spaces for the white spaces between the key and the "=" sign
My settings:
Example
changes to
Does this issue occur when all extensions are disabled?: No, because there isnt an option to Format document when --disable-extension used.
The text was updated successfully, but these errors were encountered: