       location.start += text.length - leftTrimText.length
       text = leftTrimText
     node.value = text
+
+  makeIndentBounds: (node) ->
+    bounds = {
+      start: @positions[node.__indentLocation.start]
+      end: @positions[node.__indentLocation.end]
+    }
+
+    if node.__location.endTag?
+      lastLine = @positions[node.__location.endTag.start].line - 1
+      if lastLine > bounds.end.line or (lastLine is bounds.end.line and @lines[lastLine].length > bounds.end.column)
+        bounds.end = {
+          line: lastLine
+          column: @lines[lastLine].length
+        }
+      else if node.__indentLocation.start is node.__indentLocation.end and node.__location.endTag
+        bounds.end = @positions[node.__location.endTag.start]
+
+    return bounds
 
   getSocketLevel: (node) -> helper.ANY_DROP
 

      node.__location.end = node.__indentLocation.end

    @setAttribs node, @text[node.__location.start...node.__indentLocation.start]

  makeIndentBounds: (node) ->
    bounds = {
      start: @positions[node.__indentLocation.start]
      end: @positions[node.__indentLocation.end]
    }

    if node.__location.endTag?
      lastLine = @positions[node.__location.endTag.start].line - 1
      if lastLine > bounds.end.line or (lastLine is bounds.end.line and @lines[lastLine].length > bounds.end.column)
        bounds.end = {
          line: lastLine
          column: @lines[lastLine].length
        }
      else if node.__indentLocation.start is node.__indentLocation.end and node.__location.endTag
        bounds.end = @positions[node.__location.endTag.start]

    return bounds

  trimText: (node, lastPosition) ->
    location = node.__location

          newList.push child
      node.childNodes = newList

    if node.nodeName is '#document' or node.nodeName is '#document-fragment'
      node.type = 'document'
      return
