                 output.append(newline)
             }
 
-            let text = TextNode(text: substring)
-            output.append(text)
+            let node = TextNode(text: substring)
+            output.append(node)
         }
         
         return output

    ///
    func enumerateParagraphNodes(in style: ParagraphStyle, block: ((ElementNode) -> Void)) {
        if style.blockquote != nil {
            block( ElementNode(type: .blockquote) )
        }

        if style.htmlParagraph != nil {
            block( ElementNode(type: .p) )
        }

        if style.headerLevel > 0 {
            let header = DOMString.elementTypeForHeaderLevel(style.headerLevel) ?? .h1
            block( ElementNode(type: header) )
        }

        if !style.textLists.isEmpty {
            block( ElementNode(type: .li) )
        }

        for list in style.textLists {
            if list.style == .ordered {
                block( ElementNode(type: .ol) )
            } else {
                block( ElementNode(type: .ul) )
            }
        }
    }


        guard let rootNode = try? converter.convert(attachment.rawHTML),
            let firstChild = rootNode.children.first
        else {
            return textToNodes(attachment.rawHTML)
        }

        guard rootNode.children.count == 1 else {
            let node = ElementNode(type: .span, attributes: [], children: rootNode.children)
            return [node]
        }

        return [firstChild]
