def get_last_eq()

in src/math_verify/parser.py [0:0]


def get_last_eq(latex: str):
    # This is to ensure that a=1,b=2 is not splitted
    if "," not in latex and ";" not in latex:
        eq_parts = equation_split_regex.split(latex)
        # We only shorten if there are more than 2 parts, otherwise we keep equation as is
        if len(eq_parts) > 2:
            return eq_parts[-1]
    return latex