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

    /// - The remaining elements will get merged
    ///
    func merge(left: [ElementNode], right: [ElementNode]) -> Bool {
        guard let nodes = findMergeableNodes(left: left, right: right)?.dropLast() else {
            return false
        }

        guard let (target, source) = sliceUntilLastListItemElement(nodes: Array(nodes)).last else {
            return false
        }


            return nodes
        }

        return nodes[0..<sliceIndex]
    }


