Merge pull request #61 from EthanDRaymond/DomContentJoiner-Does-Not-Use-Delimiter

Fixed a bug (maybe) where a delimiter was not being used
This commit is contained in:
David
2017-05-12 22:45:10 +02:00
committed by GitHub

View File

@@ -6,9 +6,9 @@ public class DomContentJoiner {
StringBuilder sb = new StringBuilder();
for (Object o : stringOrDomObjects) {
if (o instanceof String) {
sb.append(((String) o).trim()).append(" ");
sb.append(((String) o).trim()).append(delimiter);
} else if (o instanceof DomContent) {
sb.append(((DomContent) o).render().trim()).append(" ");
sb.append(((DomContent) o).render().trim()).append(delimiter);
} else {
throw new RuntimeException("You can only join DomContent and String objects");
}