-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hi,
I would like to use https://github.com/onevcat/Rainbow to colorize cells in a TextTable.
let table = TextTable<Attributes> {
[
Column(title: "Country", value: $0.country!.blue),
Column(title: "County", value: $0.county!.red),
]
}
table.print(result, style: Style.psql)
This result in a table where the length of the cell data in https://github.com/cfilipov/TextTable/blob/master/Sources/TextTable/TextTable.swift#L237 should only count the visible characters. The escape sequences used for colors should not be counted here:
+----------------------------+--------------------------------+
| Country | County |
+----------------------------+--------------------------------+
| Baden-Württemberg | SK Karlsruhe |
| Baden-Württemberg | SK Ulm |
(The colors are missing...)
Is there any way this can already be achieved or implemented?
Greetings
Joachim
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels