Skip to content

Commit

Permalink
Remove remaining StringBuilderFormattable occurences
Browse files Browse the repository at this point in the history
  • Loading branch information
ppkarwasz committed Feb 9, 2024
1 parent 975a312 commit 687d476
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.util.StringBuilderFormattable;
import org.asciidoctor.ast.ContentNode;
import org.asciidoctor.ast.Cursor;
import org.asciidoctor.ast.StructuralNode;
Expand Down Expand Up @@ -92,11 +91,7 @@ protected static void formatNodeCollection(
} else {
first = false;
}
if (node instanceof final StringBuilderFormattable formattable) {
formattable.formatTo(buffer);
} else {
buffer.append(node.convert());
}
formatNode(node, buffer);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.util.StringBuilderFormattable;
import org.asciidoctor.ast.Column;
import org.asciidoctor.ast.ContentNode;
import org.asciidoctor.ast.Row;
Expand Down Expand Up @@ -54,13 +53,7 @@ private static void formatColSpecifier(final int colCount, final StringBuilder b

private static void formatRow(final Row row, final StringBuilder buffer) {
buffer.append('\n');
row.getCells().forEach(cell -> {
if (cell instanceof final StringBuilderFormattable formattable) {
formattable.formatTo(buffer);
} else {
buffer.append(cell.convert());
}
});
formatNodeCollection(row.getCells(), "", buffer);
}

@Override
Expand Down

0 comments on commit 687d476

Please sign in to comment.