You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I enable word wrap with columns that have emoji in them, it eats the first letter of the word on the line below... I assume this has something to do with full width calculations.
Example
consttable=require("table");constworks=[["Name","Number"],["Some Text",24],["Some more text",22],["I am a reallylong name",19],["I have a super duperlongname",18],];constdoesntwork=[["Name","Number"],["🥇 Some Text",24],["🥈 Some more text",22],["🥉 I am a reallylong name",19],["I have a super duperlongname",18],];constconfig={columns: [{alignment: "left",width: 15,wrapWord: true},{alignment: "right",width: 10,wrapWord: true},],header: {alignment: "center",content: "My Table",wrapWord: true},};console.log(table.table(works,config));console.log(table.table(doesntwork,config));
Results
╔══════════════════════════════╗
║ My Table ║
╟─────────────────┬────────────╢
║ Name │ Number ║
╟─────────────────┼────────────╢
║ Some Text │ 24 ║
╟─────────────────┼────────────╢
║ Some more text │ 22 ║
╟─────────────────┼────────────╢
║ I am a │ 19 ║
║ reallylong name │ ║
╟─────────────────┼────────────╢
║ I have a super │ 18 ║
║ duperlongname │ ║
╚═════════════════╧════════════╝
╔══════════════════════════════╗
║ My Table ║
╟─────────────────┬────────────╢
║ Name │ Number ║
╟─────────────────┼────────────╢
║ 🥇 Some Text │ 24 ║
╟─────────────────┼────────────╢
║ 🥈 Some more │ 22 ║
║ ext │ ║
╟─────────────────┼────────────╢
║ 🥉 I am a │ 19 ║
║ eallylong name │ ║
╟─────────────────┼────────────╢
║ I have a super │ 18 ║
║ duperlongname │ ║
╚═════════════════╧════════════╝
Do you have any idea how to remedy this?
Thanks for making this library. It's of great use to me 😄
The text was updated successfully, but these errors were encountered:
Hi @awensaunders, I tested the output on MacOs and it works fine in various applications: the native terminal, iTerm2, and Intellij IDEA terminal. Can you provide some information about your working environment?
Hi there,
If I enable word wrap with columns that have emoji in them, it eats the first letter of the word on the line below... I assume this has something to do with full width calculations.
Example
Results
Do you have any idea how to remedy this?
Thanks for making this library. It's of great use to me 😄
The text was updated successfully, but these errors were encountered: