private boolean allSiblingsAreBlocks()

in codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/DocumentationConverter.java [269:295]


        private boolean allSiblingsAreBlocks(Node node) {
            // Find the nearest sibling to the left which is not a blank text node.
            Node previous = node.previousSibling();
            while (true) {
                if (previous instanceof TextNode) {
                    if (((TextNode) previous).isBlank()) {
                        previous = previous.previousSibling();
                        continue;
                    }
                }
                break;
            }

            // Find the nearest sibling to the right which is not a blank text node.
            Node next = node.nextSibling();
            while (true) {
                if (next instanceof TextNode) {
                    if (((TextNode) next).isBlank()) {
                        next = next.nextSibling();
                        continue;
                    }
                }
                break;
            }

            return (previous == null || isBlockNode(previous)) && (next == null || isBlockNode(next));
        }