import re


def _sanitize_comment(text):
    """Remove comment syntax from comment text.

    Args:
        text: The raw comment text

    Returns:
        The cleaned up comment text
    """

    is_multiline_comment = text.startswith('/*')

    # Remove C style comments
    text = re.sub('[ \t]*(\/\*|\*\/|\/\/)', '', text)

    # Remove leading asterisks in multiline comments.
    if is_multiline_comment:
        lines = text.split('\n')
        lines = [line.lstrip(' *') for line in lines]
        text = '\n'.join(lines)

    return text