"""Deal with the comments of a LaTeX document"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/33_latex.comments.ipynb.

# %% auto 0
__all__ = ['remove_comments']

# %% ../../nbs/33_latex.comments.ipynb 2
import re

# %% ../../nbs/33_latex.comments.ipynb 5
def remove_comments(text: str) -> str:
    # Find all occurrences of the comment pattern %[^\n]*
    return re.sub(r"%[^\n]*", "", text)
