function getLineNumber(content, idx) {
  const subStr = content.substring(0, idx);
  const lineNum = subStr.split(/\r\n|\r|\n/).length;
  return lineNum;
}
Gets the line number of the current string up to the index point

@param {string} content The content of the string to check
@param {Number} idx Where in the string to stop
@return {Number} The line number the index ends on