   appendStringWithAttributes: (string, attributes) ->
     @appendPiece(pieceForString(string, attributes))
 
-  appendAttachmentForAttributes: (attachment, attributes) ->
+  appendAttachmentWithAttributes: (attachment, attributes) ->
     @appendPiece(pieceForAttachment(attachment, attributes))
 
   appendPiece: (piece) ->

          for key, value of getImageDimensions(image)
            if value isnt attributes[key]
              textAttributes[key] = value
        @appendAttachmentForAttributes(attributes, textAttributes)
        # We have everything we need so avoid processing inner nodes
        element.innerHTML = ""
      @processedElements.push(element)

        when "img"
          attributes = url: element.src, contentType: "image"
          attributes[key] = value for key, value of getImageDimensions(element)
          @appendAttachmentWithAttributes(attributes, getTextAttributes(element))
          @processedElements.push(element)
        when "tr"
          unless element.parentNode.firstChild is element
