<commit_before>from __future__ import absolute_import

import re

from compress.filter_base import FilterBase

class MollyCSSFilter(FilterBase):
    _WHITESPACE_RE = re.compile(r'[ \t\n\r]+')
    def filter_css(self, css):
        return self._WHITESPACE_RE.sub(' ', css).strip()<commit_msg>Updated MollyCSSFilter to remove comments.<commit_after>from __future__ import absolute_import

import re

from compress.filter_base import FilterBase

class MollyCSSFilter(FilterBase):
    _COMMENT_RE = re.compile(r'/\*.*?\*/')
    _WHITESPACE_RE = re.compile(r'[ \t\n\r]+')
    def filter_css(self, css):
        css = self._COMMENT_RE.sub('', css)
        css = self._WHITESPACE_RE.sub(' ', css)
        return css.strip()
{'fraction_non_alphanumeric': 0.1270949720670391, 'fraction_numerical': 0.0, 'mean_word_length': 4.049295774647887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '791039', 'n_tokens_mistral': 246, 'n_tokens_neox': 239, 'n_words': 52}