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

feat(printer): ✨ optimize printRow function to adjust column spacing #186

Merged
merged 3 commits into from
May 30, 2024

Conversation

Equationzhao
Copy link
Owner

No description provided.

- Updated the `printRow` function to ensure each column's longest element is followed by a specified number of spaces.
- The number of spaces between columns is adjustable via a `space` parameter.
- Calculated the maximum width for each column dynamically to ensure proper alignment of elements.
- Determined the optimal number of columns based on the terminal width to  maximize the use of available space in each row.
- This change improves the visual alignment of output in narrow terminals and allows for better utilization of terminal width.
@Equationzhao Equationzhao added enhancement New feature or request merge when passing Merge the PR automatically once all status checks have passed labels May 30, 2024
@repo-ranger repo-ranger bot merged commit cce3ab4 into master May 30, 2024
2 checks passed
@repo-ranger repo-ranger bot deleted the feat/adjust-column-spacing branch May 30, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request merge when passing Merge the PR automatically once all status checks have passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant