dineshba / tf-summarize

A command-line utility to print the summary of the terraform plan
MIT License
533 stars 38 forks source link

Resource names with a space in them are line split in markdown, breaking formatting #82

Open robzr opened 4 days ago

robzr commented 4 days ago

Example of generated markdown from 0.3.13. Note that this is not a regression, this has been happening as long as I've used tf-summarize:

| CHANGE |                      RESOURCE                       |
|--------|-----------------------------------------------------|
| add    | `github_organization_ruleset.this["Org              |
|        | Require Signatures"]`                               |
|        | `github_repository_ruleset.this["repo-next/Code     |
|        | Freeze"]`                                           |
Renders as: CHANGE RESOURCE
add `github_organization_ruleset.this["Org
Require Signatures"]`
`github_repository_ruleset.this["repo-next/Code
Freeze"]`
dineshba commented 8 hours ago

Thanks for reporting this issue @robzr . I was able to reproduce this issue.

If the resource name has space in-between and if it crossed certain length, then this auto-wrapping happen and goes into new line which creates invalid table row syntax.

Doesn't look like quick fix. I will try to fix it soon. Code location. If anyone able to fix it, please feel free to raise PR