-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add AutoSize parameter to New-MDTable function #20
Conversation
@al-cheb before we proceed I need to understand the use case. If I understand correctly, you want this | Name | DisplayName |
| ------- | -------------- |
| DcomLaunch | DCOM Server Process Launcher |
| diagnosticshub.standardcollector.service | Microsoft (R) Diagnostics Hub Standard Collector Service |
| dmwappushservice | Device Management Wireless Application Protocol (WAP) Push message Routing Service | to render like this | Name | DisplayName |
| ---------------------------------------- | ---------------------------------------------------------------------------------- |
| DcomLaunch | DCOM Server Process Launcher |
| diagnosticshub.standardcollector.service | Microsoft (R) Diagnostics Hub Standard Collector Service |
| dmwappushservice | Device Management Wireless Application Protocol (WAP) Push message Routing Service Set aside that there is a trailing For example the original
And what you propose
I don't see the difference to be honest |
@Sarafian With AutoSize Raw file: Without AutoSize Raw file: |
Now I understand and you've actually given me some food for thought. I've always approached this module's output from the perspective of manually writing the same and I would never align my comment as described because then I would always have to manage the spaces. What if a column got bigger or smaller, do I need to adjust every other line? But, this is generated markdown and from that perspective, it does make sense to produce evenly aligned markdown because the invention is not to edit but to generate and overwrite again. I don't like the The idea had merit but some work is needed for now. If you have other ideas for the parameter name, more in the direction of "beauty" or "alignment" then please share. |
Got some time to work on this. I figured out that we were both incorrect. The default mode of the module is to take the maximum length of any given cell and use it for all including the headers. Your proposal with |
@Sarafian, Thank you. Looks good to me. |
Changes available in version 1.9. Sorry for skipping some but I had some issues with obsolete publishing. |
AutoSize - Indicates that the function adjusts the column size and number of columns based on the width of the data