 
     body.innerHTML
 
-  isExtraBR = (element) ->
-    previousSibling = element.previousElementSibling
-    tagName(element) is "br" and
-      (not previousSibling? or tagName(element) is tagName(previousSibling)) and
-      element is element.parentNode.lastChild and
-      window.getComputedStyle(element.parentNode).display is "block"
-
   getBlockElementMargin = (element) ->
     style = window.getComputedStyle(element)
     if style.display is "block"

    else
      switch tagName(element)
        when "br"
          unless isExtraBR(element)
            @appendStringWithAttributes("\n", getTextAttributes(element))
          @processedElements.push(element)
        when "img"

    else if @currentBlockElement and not elementContainsNode(@currentBlockElement, element) and not @isBlockElement(element)
        @currentBlock = @appendBlockForAttributes({})
        @currentBlockElement = null

  isExtraBR: (element) ->
    return unless tagName(element) is "br"

    previousSibling = element.previousElementSibling
    nextSibling = element.nextElementSibling
    isLastChild = not nextSibling
    isOnlyChild = isLastChild and not previousSibling
    previousSiblingIsBR = tagName(previousSibling) is "br"
    parentIsBlock = @isBlockElement(element.parentNode)

    parentIsBlock and (isOnlyChild or (isLastChild and previousSiblingIsBR))

  isBlockElement: (element) ->
    return unless element?.nodeType is Node.ELEMENT_NODE
