                 newtext = just(row[i], justify[i], widths[i])
                 line.push(newtext)
 
-            keepFirstAndLastPipes = atom.config.get("markdown-table-formatter.keepFirstAndLastPipes")
-
-            if keepFirstAndLastPipes
+            if @keepFirstAndLastPipes
                 formatted.push('|' + line.join('|') + '|')
             else
                 formatted.push(line.join('|'))


        columns = justify.length

        spacePadding = atom.config.get("markdown-table-formatter.spacePadding")

        content = []
        for line in lines
            line = line.trim().replace(/(^\||\|$)/g,"")
            cells = line.split('|')
            linecontent = ( ' '.repeat(spacePadding) + x.trim() + ' '.repeat(spacePadding) for x in cells )
            content.push(linecontent)

        rows = content.length


        selectionsRanges = editor.getSelectedBufferRanges()
        # console.log(selectionsRanges[0].isEmpty())
        # console.log(@autoSelectEntireDocument)

        if force or (selectionsRanges[0].isEmpty() and @autoSelectEntireDocument)
            # console.log('all selected')
            selectionsRanges = [editor.getBuffer().getRange()]

