         GutenbergInputHTMLTreeProcessor.classInitializer
     }
     
-    private enum State {
-        case noBlock
-        case blockInProgress(opener: CommentNode, gutenblock: ElementNode)
-    }
-    
     typealias Replacement = (range: Range<Int>, nodes: [Node])
     
     public func process(_ rootNode: RootNode) {

            
            result.append(gutenblock)
            
            process(gutenblock)
            
            openerSlice = nodes[closerOffset + 1 ..< nodes.count]
        }
        

            result += [Node](openerSlice)
        }
        
        for node in result {
            if let elementNode = node as? ElementNode {
                process(elementNode)
            }
        }
        
        return result
    }
}

// MARK: - Gutenblock pairing logic

private extension GutenbergInputHTMLTreeProcessor {
    private func nextOpener(in nodes: ArraySlice<Node>) -> OpenerMatch? {
        for (index, node) in nodes.enumerated() {
            guard let commentNode = node as? CommentNode,
                commentNode.isGutenbergBlockOpener() else {
                    continue
            }
            
            return OpenerMatch(offset: index, opener: commentNode)
        }
        
        return nil
    }

    private func nextCloser(in nodes: ArraySlice<Node>, forOpener opener: CommentNode) -> CloserMatch? {
        for (index, node) in nodes.enumerated() {
            guard let commentNode = node as? CommentNode,
                commentNode.isGutenbergBlockCloser(forOpener: opener) else {
                    continue
            }
            
            return CloserMatch(offset: index, closer: commentNode)
        }
        
        return nil
    }
}

// MARK: - Gutenblock attributes
