Skip to content

Conversation

Linkster78
Copy link
Contributor

@Linkster78 Linkster78 commented Jul 10, 2025

The change could've been made with tablewriter 0.0.5, but native markdown support was only implemented in later versions so it would've required a bit more code to make it work as-is.

The only behavioral difference from the looks of it is the removal of an extra space on the left side when using -f compact.

Closes #2194

@Linkster78 Linkster78 marked this pull request as ready for review July 10, 2025 03:11
@Linkster78 Linkster78 requested a review from stgraber as a code owner July 10, 2025 03:11
@Linkster78 Linkster78 marked this pull request as draft July 10, 2025 03:12
@Linkster78 Linkster78 marked this pull request as ready for review July 10, 2025 03:25
@Linkster78 Linkster78 force-pushed the list-format-markdown branch from 3317f22 to 732bc3c Compare July 11, 2025 18:19
@Linkster78
Copy link
Contributor Author

Hey @stgraber, I have to say I'm not sure I understand the CI results, the logs don't seem to point towards anything modified in this PR.

Any pointers would be greatly appreciated 😅

@stgraber
Copy link
Member

We seem to be getting some garbled output out of the CLI, we're running incus project list and expecting the normal table output but instead we're getting something that's giving us [[default as the project name, causing things to fail.

@stgraber
Copy link
Member

Yeah, there's something very wrong here:

stgraber@dakara:~/Code/lxc/incus (git:list-format-markdown)$ incus project list
+------------------------------------------------------------------------------------------------------------------------------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------+---------+
|                                                                         NAME                                                                         | IMAGES | PROFILES | STORAGE VOLUMES | STORAGE BUCKETS | NETWORKS | NETWORK ZONES | DESCRIPTION | USED BY |
+------------------------------------------------------------------------------------------------------------------------------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------+---------+
| [[default (current) YES YES YES YES YES YES Default Incus project 26] [user-1001 YES YES YES YES NO YES User restricted project for "foo" (1001) 1]] |        |          |                 |                 |          |               |             |         |
+------------------------------------------------------------------------------------------------------------------------------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------+---------+

@Linkster78
Copy link
Contributor Author

Linkster78 commented Jul 12, 2025

That's weird, it might be related to the auto-formatting that's enabled by default in table writer >1.0.0.

I'll be a bit short on time tomorrow, but I'll try to look into it in the coming days. Thanks!

Signed-off-by: Julien Champoux <champoux.julien@gmail.com>
Signed-off-by: Julien Champoux <champoux.julien@gmail.com>
Signed-off-by: Julien Champoux <champoux.julien@gmail.com>
@stgraber stgraber force-pushed the list-format-markdown branch from 7200cf2 to 3bbdecf Compare July 14, 2025 00:26
@stgraber stgraber merged commit e857bf8 into lxc:main Jul 14, 2025
70 of 72 checks passed
@stgraber
Copy link
Member

Thanks!

@Linkster78 Linkster78 deleted the list-format-markdown branch July 14, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support formatting lists as markdown table
2 participants