 {CompositeDisposable,Range} = require('atom')
 wcswidth = require 'wcwidth'
+
+# DEBUG = true
+
+swidth = (str) ->
+  zwcrx = /[\u200B-\u200D\uFEFF\u00AD]/g
+  wcswidth(str) - ( str.match(zwcrx)?.length or 0 )
 
 module.exports =
 class TableFormatter


  formatTable: (text) ->
    just = (string, type, n) ->
      length = n - wcswidth(string)
      if type == '::'
        return ' '.repeat(length/2) + string + ' '.repeat((length+1)/2)
      else if type == '-:'


    for row in content
      for i in [0..columns-1]
        widths[i] = max(swidth(row[i]), widths[i])

    formatted = []
    for row in content
