-
Notifications
You must be signed in to change notification settings - Fork 202
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
Fix the combination of "table " and \n in report formats #1344
Conversation
LGTM |
pkg/report/formatter.go
Outdated
f.RenderTable = true | ||
normText = "{{range .}}" + NormalizeFormat(text) + "{{end -}}" | ||
text = "{{range .}}" + text + "{{end -}}" | ||
text = "{{range .}}" + text[len("table "):] + "{{end -}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct, I assume you do not want to hardcode it to 6 for readability? However one might still change the string above without updating this one so I say combine them into one variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, let me do the methodical thing and backport the future-standard-library function, instead of suggesting that someone else should restructure the code in the future.
Completely skipping the NormalizeFormat part also skipped the removal of the "table " directive. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, mtrmac The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/hold cancel |
Completely skipping the NormalizeFormat part also skipped the removal of the "table " directive.
Cc: @Luap99 , this is related to #1146 . I might be missing something.