Skip to content

Support for table cells that contain multiple lines #11

Description

@rafaelzita

Hello I was trying to create a table with a cell that contains text spanning multiple lines.
It seems that output can't handle it and looks broken.

Table.Builder tableBuilder = new Table.Builder()
.withAlignments(Table.ALIGN_LEFT, Table.ALIGN_LEFT, Table.ALIGN_LEFT)
.addRow(new BoldText("Version"), new BoldText("Comment"))
.addRow("1.0", "Initial Version\nChanged by Joe")
.addRow("2.0", "");

System.out.println(tableBuilder.build());

What happens now

Version Comment
1.0 Initial Version
Changed by Joe
2.0 New Changes

Expected:

Version Comment
1.0 Initial Version
Changed by Joe
2.0 New Changes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions