     /// - The remaining elements will get merged
     ///
     func merge(left: [ElementNode], right: [ElementNode]) -> Bool {
-        guard let nodes = findMergeableNodes(left: left, right: right)?.dropLast() else {
+        guard let mergeableNodes = findMergeableNodes(left: left, right: right)?.dropLast() else {
             return false
         }
 
-        guard let (target, source) = sliceUntilLastListItemElement(nodes: Array(nodes)).last else {
+        guard let (target, source) = prefix(upTo: "li", from: mergeableNodes).last else {
             return false
         }
 

            return nodes
        }

        return Array(nodes[0..<sliceIndex])
    }



    ///
    /// - Output: [.ul]
    ///
    func prefix(upTo name: String, from nodes: ArraySlice<MergeablePair>) -> ArraySlice<MergeablePair> {
        var lastItemIndex: Int?
        for (index, node) in nodes.enumerated().reversed() where node.left.name == name {
            lastItemIndex = index
            break
        }
