<commit_before>'use strict';

const path = require('path');
const postcss = require('postcss');

const paths = require('../../config/paths');

const RE_SPRITES_FILTER = /\.(jpe?g|png|gif)\?__sprite$/;
const RE_SPRITES_RETINA = new RegExp('@(\\d+)x\\.(jpe?g|png|gif)$', 'i');

/**
 * 过滤一些不需要合并的图片，返回值是一个promise，默认有一个exist的filter
 * @param image
 * @returns {*}
 */
function spritesFilterBy(image) {
    if (RE_SPRITES_FILTER.test(image.originalUrl)) {
        return Promise.resolve();
    }
    return Promise.reject();
}

function spritesGroupBy(regPath, image) {
    let groups = regPath.exec(image.url);
    let groupName = groups && groups.length > 1 ? groups[1] : '';

    image.retina = true;<commit_msg>postcssSprites paths路径引用错误修正<commit_after>'use strict';

const path = require('path');
const postcss = require('postcss');

const paths = require('../config/paths');

const RE_SPRITES_FILTER = /\.(jpe?g|png|gif)\?__sprite$/;
const RE_SPRITES_RETINA = new RegExp('@(\\d+)x\\.(jpe?g|png|gif)$', 'i');

/**
 * 过滤一些不需要合并的图片，返回值是一个promise，默认有一个exist的filter
 * @param image
 * @returns {*}
 */
function spritesFilterBy(image) {
    if (RE_SPRITES_FILTER.test(image.originalUrl)) {
        return Promise.resolve();
    }
    return Promise.reject();
}

function spritesGroupBy(regPath, image) {
    let groups = regPath.exec(image.url);
    let groupName = groups && groups.length > 1 ? groups[1] : '';

    image.retina = true;
{'fraction_non_alphanumeric': 0.17807262569832402, 'fraction_numerical': 0.002793296089385475, 'mean_word_length': 4.249084249084249, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3597989', 'n_tokens_mistral': 554, 'n_tokens_neox': 547, 'n_words': 90}