vdmeer / asciitable

Several implementations of a text table, originally using ASCII and UTF-8 characters for borders.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thread locks rendering centered content

EthanZeigler opened this issue · comments

commented

I'm getting a thread lock attempting to render this input.

AsciiTable table = new AsciiTable();
table.setTextAlignment(TextAlignment.CENTER);
table.addRule();
table.addRow(new String[]{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"});
table.addRule();

// example of a case where it happens...
String[] tableContent = new String[5];
tableContent[0] = "<br><br><=====>9:31AM - 10:51AM CSC 415<br> STEM Building 112 w/ S. Devlin,S. Pulimood<br><br><br><=====>9:31AM - 10:51AM CSC 415<br> STEM Building 112 w/ S. Devlin,S. Pulimood<br><br><br><=====>23:01PM - 12:21PM CSC 415<br> STEM Building 112 w/ S. Devlin,S. Pulimood<br><br><br><=====>27:31PM - 4:51AM CLS 250<br> Bliss Hall Annex 234 w/ C. Pilney<br><br><br><=====>26:01PM - 3:21AM CSC 299<br> Forcina Hall 409 w/ D. Knox<br><br><br><=====>26:01PM - 3:21AM CSC 299<br> Forcina Hall 409 w/ D. Knox<br><br><br><=====>26:01PM - 3:21AM CSC 299<br> STEM Building 102 w/ D. Knox<br>";
tableContent[1] = "<br><br><=====>9:31AM - 10:51AM WGS 220<br> Social Sciences Building 325 w/ J. Kurtz<br>";
tableContent[2] = "";
tableContent[3] = "<br><br><=====>9:31AM - 10:51AM CSC 415<br> STEM Building 112 w/ S. Devlin,S. Pulimood<br><br><br><=====>9:31AM - 10:51AM CSC 415<br> STEM Building 112 w/ S. Devlin,S. Pulimood<br><br><br><=====>27:31PM - 4:51AM CLS 250<br> Bliss Hall Annex 234 w/ C. Pilney<br>";
tableContent[4] = "<br><br><=====>9:31AM - 10:51AM WGS 220<br> Social Sciences Building 325 w/ J. Kurtz<br>";
table.addRow(tableContent);

table.addRule();

System.out.println(table.render(120)); // locks

Sorry about the text block. It isn't happy rendering <br>