def strip_html_comments(text):
    lines = text.splitlines(True)  # preserve line endings.

    # Remove HTML comments (which we only allow to take a special form).
    new_lines = filter(lambda line: not line.startswith("<!--"), lines)

    return "".join(new_lines)


# We write the converted file to a temp file to simplify debugging and
# to avoid removing a valid pre-existing file on failure.
Descriptor for the all the JSON Schema used.
dataset/ETHPy150Open defunkt/pystache/setup.py/strip_html_comments--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/endpoints/api_config.py/ApiConfigGenerator.__schema_descriptor