<commit_before>'use strict';

var fs = require('fs'),
    _ = require('underscore'),
    Parser = require('css-parse'),
    Stringify = require('css-stringify/lib/compress');


// overwrite media compiler method
Stringify.prototype.media = function(node) {
    if(!this.matchMedia(node.media)) {
        return '';
    }

    return node.rules.map(this.visit, this).join('');
};


/**
 * parse media queries
 * @param str
 * @returns {boolean}
 */
Stringify.prototype.matchMedia = function(str) {
    var self = this,
        queries = str.toLowerCase().match(/\((.+)\)/gi),
        matches = [];

    queries.forEach(function(query) {<commit_msg>should resolve issue #2 - "Error when @media print encountered"<commit_after>'use strict';

var fs = require('fs'),
    _ = require('underscore'),
    Parser = require('css-parse'),
    Stringify = require('css-stringify/lib/compress');


// overwrite media compiler method
Stringify.prototype.media = function(node) {
    if(!this.matchMedia(node.media)) {
        return '';
    }

    return node.rules.map(this.visit, this).join('');
};


/**
 * parse media queries
 * @param str
 * @returns {boolean}
 */
Stringify.prototype.matchMedia = function(str) {
    var self = this,
        queries = str.toLowerCase().match(/\((.+)\)/gi),
        matches = [];

    if(!queries)
        return;

    queries.forEach(function(query) {
{'fraction_non_alphanumeric': 0.1734397677793904, 'fraction_numerical': 0.000725689404934688, 'mean_word_length': 3.1536144578313254, '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': '769897', 'n_tokens_mistral': 424, 'n_tokens_neox': 414, 'n_words': 84}