code: function mergeTokens(tokens, mergeWith) {
      if (tokens.length == 0) return null;
  
      var value = '';
      var offset = 0;
  
      var firstIndex = _.first(tokens).index;
  
      _.each(tokens, function(token, i) {
          var prev = tokens[i - 1];
          var next = tokens[i + 1];
  
          var toFill = prev? (token.index + 1 - (prev.index + prev.offset)): 0;
          value = value + new Array(toFill).join(mergeWith) + token.value;
  
          var absoluteOffset = (token.index - firstIndex) + token.offset;
          if (absoluteOffset > offset) offset = absoluteOffset;
      });
  
      return {
          // Index equal is the one from the first token
          index: firstIndex,
  
          value: value,
          offset: Math.max(offset, value.length)
      }
  }
docs: Merge tokens