• Break up the text into its component parts and search through them for math delimiters, braces, linebreaks, etc. Math delimiters must match and braces must balance. Don't allow math to pass through a double linebreak (which will be a paragraph).

    Parameters

    • text: string

    Returns {
        math: string[];
        text: string;
    }

    • math: string[]
    • text: string