def remove_trailing_whitespace(tex_source):
<EOL>return re.sub(r'<STR_LIT>', '<STR_LIT>', tex_source, flags=re.M)<EOL>
Delete trailing whitespace from TeX source.

    Parameters
    ----------
    tex_source : str
        TeX source content.

    Returns
    -------
    tex_source : str
        TeX source without trailing whitespace.