 # @param  {Editor} editor Brackets editor instance
 # @return {String}
 normalize = (text, editor) ->
-  editorUtils.normalize text, 
+  editorUtils.normalize text,
     indentation: editor.getTabText(),
     newline: '\n'
 
 # Proprocess text data that should be used as snippet content
-# Currently, Atom’s snippets implementation has the following issues: 
+# Currently, Atom’s snippets implementation has the following issues:
 # * supports $N or ${N:placeholder} notation, but not ${N}
 # * multiple $0 are not treated as distinct final tabstops
 preprocessSnippet = (value) ->

        placeholder = tabStops.processText(placeholder, tabstopOptions)

      if placeholder then "${#{group}:#{placeholder}}" else "$#{group}"
      
    escape: (ch) ->
      if ch == '$' then '\\$' else ch


    # Before inserting snippet we have to reset all available selections
    # to insert snippent right in required place. Otherwise snippet
    # will be inserted for each selection in editor

    # Right after that we should save first available selection as buffer range
    caret = buf.positionForCharacterIndex(start)
    @editor.setSelectedBufferRange(new Range(caret, caret))
