Skip to content

Support for table cells that contain multiple lines #11

Open
@rafaelzita

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions