// utils/parseMath.ts
export const parseMathInput = (input: string): string => {
  let parsedInput = input;

  // Example conversion for square root, assuming the input uses √ for square root
  parsedInput = parsedInput.replace(/√\s*([0-9a-zA-Z]+)/g, '\\sqrt{$1}');

  // Add more conversions as needed
  // For example, if Google Docs uses "^" for superscript:
  parsedInput = parsedInput.replace(/([0-9a-zA-Z]+)\^([0-9a-zA-Z]+)/g, '$1^{ $2 }');

  return parsedInput;
};
