We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sample code (kotlin):
val s1 = "0 0\n0 0" val s2 = "1 1\n1 1" val s3 = "2 2\n2 2" val s4 = "┌─────┬─────┐\n" + "│3 3 3│3 3 3│\n" + "│3 3 3│3 3 3│\n" + "│3 3 3│3 3 3│\n" + "│3 3 3│3 3 3│\n" + "├─────┼─────┤\n" + "│3 3 3│3 3 3│\n" + "│3 3 3│3 3 3│\n" + "│3 3 3│3 3 3│\n" + "│3 3 3│3 3 3│\n" + "└─────┴─────┘" val at = AsciiTable() at.renderer.cwc = CWC_LongestLine() at.addRule() at.addRow(s1, s2) at.addRule() at.addRow(s3, s4) at.addRule() println(at.render())
Expected output:
┌───┬─────────────┐ │0 0│1 1 │ │0 0│1 1 │ ├───┼─────────────┤ │2 2│┌─────┬─────┐│ │2 2││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ │├─────┼─────┤│ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ │└─────┴─────┘│ └───┴─────────────┘
Actual output:
┌───┬─────────────┐ │0 0│1 1 1 1 │ │0 0│ │ ├───┼─────────────┤ │2 2│┌─────┬─────┐│ │2 2││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ │├─────┼─────┤│ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ ││3 3 3│3 3 3││ │ │└─────┴─────┘│ └───┴─────────────┘
Not setting CWC_LongestLine() results in the top left and bottom left being expanded to 0 0 0 0 and 2 2 2 2 respectively
CWC_LongestLine()
0 0 0 0
2 2 2 2
Similarly, replacing the 3 3 3 ... with
3 3 3 ...
3 4 5 6 7 8 9 10 11 12 13 14
Results in strange output too:
┌───┬───────────────────┐ │0 0│1 1 1 1 │ │0 0│ │ ├───┼───────────────────┤ │2 2│┌────────┬────────┐│ │2 2││3 4 5 6│3 4 5 6││ │ ││7 8 9 10│7 8 9 10││ │ ││11 12 13│11 12 13││ │ ││14 │14 ││ │ │├────────┼────────┤│ │ ││3 4 5 6│3 4 5 6││ │ ││7 8 9 10│7 8 9 10││ │ ││11 12 13│11 12 13││ │ ││14 │14 ││ │ │└────────┴────────┘│ └───┴───────────────────┘
Though this only happens in nested tables; Using the bottom right table alone gives "proper" output (despite 14 being on a new line):
┌────────┬────────┐ │3 4 5 6│3 4 5 6│ │7 8 9 10│7 8 9 10│ │11 12 13│11 12 13│ │14 │14 │ ├────────┼────────┤ │3 4 5 6│3 4 5 6│ │7 8 9 10│7 8 9 10│ │11 12 13│11 12 13│ │14 │14 │ └────────┴────────┘
Replacing newlines with <br> does not help much:
<br>
┌───┬───────────────────┐ │0 0│1 1│ │0 0│1 1 │ ├───┼───────────────────┤ │2 2│┌────────┬────────┐│ │2 2││3 4 5│3 4 5││ │ ││6 7 8│6 7 8││ │ ││9 10 11│9 10 11││ │ ││12 13 14│12 13 14││ │ │├────────┼────────┤│ │ ││3 4 5│3 4 5││ │ ││6 7 8│6 7 8││ │ ││9 10 11│9 10 11││ │ ││12 13 14│12 13 14││ │ │└────────┴────────┘│ └───┴───────────────────┘
The text was updated successfully, but these errors were encountered:
same problem here.
Sorry, something went wrong.
No branches or pull requests
Sample code (kotlin):
Expected output:
Actual output:
Not setting
CWC_LongestLine()
results in the top left and bottom left being expanded to0 0 0 0
and2 2 2 2
respectivelySimilarly, replacing the
3 3 3 ...
withResults in strange output too:
Though this only happens in nested tables; Using the bottom right table alone gives "proper" output (despite 14 being on a new line):
Replacing newlines with
<br>
does not help much:The text was updated successfully, but these errors were encountered: