           currentLine += leftSpace + lineCharacter + rightSpace
           currentLine += section.after
 
-      textBlock += currentLine
-      textBlock += "\n" unless currentRow is range.end.row
+      lines.push currentLine
 
     # Set the first line to the start of the line
     range.start.column = 0

    range.end.column = Infinity

    # Replace the whole block
    editor.setTextInBufferRange(range, textBlock)

    # Update the cursor to the end of the original line
    editor.setCursorBufferPosition range.end

  @param {Object} sectionizedLines
  ###
  formatRange: (editor, range, character, offsets, sectionizedLines) ->
    scope  = editor.getRootScopeDescriptor().getScopeChain()
    config = operatorConfig.getConfig character, scope
    lines  = []

    for currentRow in range.getRows()
      currentLine   = ""
      tokenizedLine = helper.getTokenizedLineForBufferRow(editor, currentRow)
      lineCharacter = helper.getAlignCharacter editor, currentRow
      canAlignWith  = operatorConfig.canAlignWith character, lineCharacter, config

      if not lineCharacter or not canAlignWith or tokenizedLine.isComment()
        lines.push(editor.lineTextForBufferRow(currentRow))
        continue

      sectionizedLine = sectionizedLines[currentRow]

      for section, i in sectionizedLine.sections
        offset = section.offset + (if sectionizedLine.hasPrefix() then 1 else 0)
