-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
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
Support for table cells that contain multiple lines #11
Comments
I managed to fix this by modifying Table.java package markdowntest.markdowntest; import static net.steppschuh.markdowngenerator.util.StringUtil.surroundValueWith; import java.util.ArrayList; import net.steppschuh.markdowngenerator.MarkdownElement; public class Table extends MarkdownElement {
// if (rows.indexOf(row) < rows.size() - 1) {
}Note that I changed the format of the markdown table to be compatible with pandoc's markdown. |
Hey Rafael,
To avoid breaking changes, I would suggest creating a new class, e.g. |
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
Expected:
The text was updated successfully, but these errors were encountered: