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

newlines in cells produce newlines in table #438

Closed
lnocera opened this issue Jan 29, 2023 · 2 comments · Fixed by #466
Closed

newlines in cells produce newlines in table #438

lnocera opened this issue Jan 29, 2023 · 2 comments · Fixed by #466
Labels
enhancement New feature or request released

Comments

@lnocera
Copy link

lnocera commented Jan 29, 2023

Example:

const p = new Table();
p.addRows([{ col1: 'col1', col2: `col\n2`, col3: 'col3' }]);
p.printTable();

produce:

┌──────┬──────┬──────┐
│ col1 │ col2 │ col3 │
├──────┼──────┼──────┤
│ col1 │ col
2 │ col3 │
└──────┴──────┴──────┘

expect:

┌──────┬──────┬──────┐
│ col1 │ col2 │ col3 │
├──────┼──────┼──────┤
│ col1 │ col2 │ col3 │
│      │ 2    │      │
└──────┴──────┴──────┘
@ayonious ayonious added the enhancement New feature or request label Feb 16, 2023
@ayonious
Copy link
Owner

Considering this an edge case the solution might take some time to implement. But Prs are welcome

ayonious pushed a commit that referenced this issue Apr 19, 2024
ayonious pushed a commit that referenced this issue Jun 20, 2024
## [2.12.1](v2.12.0...v2.12.1) (2024-06-20)

### Bug Fixes

* new lines in cells broke table format ([#466](#466)) ([6b28738](6b28738)), closes [#438](#438)
@ayonious
Copy link
Owner

🎉 This issue has been resolved in version 2.12.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants