     selObj = window.getSelection()
     selRange = selObj.getRangeAt(0)
     text = $textArea.val()
-    lineBreak = '\n' if textArea.selectionStart > 0
-    console.log(textArea.selectionStart,lineBreak)
+    if textArea.selectionStart > 0 
+      lineBreak = '\n'
+    else
+      lineBreak = ''
+
     replaceWith = @replaceRange(
       text,
       textArea.selectionStart,

            gl.text._previousState,
            $thisTextarea.val()
          )
          
      gl.text._previousState = $thisTextarea.val()

  gl.text.removeListeners = () ->

    $thisTextarea.val(latestUndo.newVal)

  gl.text.addListeners = () ->
    self = @
    $('.js-md').on 'click', ->
      $this = $(@)
