code: function _getDistanceFromLastNewline(str, i) {
      var distance = i;
      var lastNewlineIndex = str.lastIndexOf('\n');
      if (lastNewlineIndex !== -1) {
          distance = (i - lastNewlineIndex - 1);
      }
  
      return distance;
  }
docs: /*!
  Given a string that might contain new-lines, the number of characters `i` is away from the last
  new-line in the string. If the string does not contain a new-line, the result is just `i`