Skip to content
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

ConvertTo-Markdown rearranges the columns #2

Open
Sarafian opened this issue Mar 31, 2016 · 3 comments
Open

ConvertTo-Markdown rearranges the columns #2

Sarafian opened this issue Mar 31, 2016 · 3 comments

Comments

@Sarafian
Copy link

Get-Process` | Select-Object ProcessName,Id,CPU |ConvertTo-Markdown

outputs

ProcessName                     | CPU          | Id   
------------------------------- | ------------ | -----

Notice that the sequence of

  1. ProcessName
  2. Id
  3. CPU

has been changed to

  1. ProcessName
  2. CPU
  3. Id

I experimented a bit with different sequences but I couldn't find the pattern.

@gregharms
Copy link

Commenting to say I experienced the same issue where the order of property names in Select-Object is not reflected in ConvertTo-Markdown output.

@Sarafian
Copy link
Author

This is an issue in general with powershell. When using plain hashes, you cannot be sure about the sequence of the keys. Try [ordered] and you might get improvements. I had to work with these concepts when I developed my own powershell markdown renderer Sarafian/MarkdownPS

@herculosh
Copy link

@ishu3101 see my pull request #3 - it would be nice to implement. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants