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

Fix the combination of "table " and \n in report formats #1344

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Feb 22, 2023

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.

@rhatdan
Copy link
Member

rhatdan commented Feb 23, 2023

LGTM

f.RenderTable = true
normText = "{{range .}}" + NormalizeFormat(text) + "{{end -}}"
text = "{{range .}}" + text + "{{end -}}"
text = "{{range .}}" + text[len("table "):] + "{{end -}}"
Copy link
Member

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.

Copy link
Contributor Author

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>
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 27, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Luap99
Copy link
Member

Luap99 commented Feb 27, 2023

/lgtm
/hold

@Luap99
Copy link
Member

Luap99 commented Feb 27, 2023

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit 1a7e1f4 into containers:main Feb 27, 2023
@mtrmac mtrmac deleted the report-table branch February 27, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants