<commit_before><?php
class dplayer_class
{
    function parseCallback($post,$siteurl,$dmserver,$theme) {
        $pattern = self::get_shortcode_regex(array('dplayer'));
        preg_match_all("/$pattern/",$post,$matches);
        if (empty($matches[0])) {
            return $post;
        }
        if ($matches[1] == '[' && $matches[6] == ']') {
            return substr($matches[0], 1, -1);
        }
        for ($i=0;$i<count($matches[3]);$i++) {
            $attr = htmlspecialchars_decode($matches[3][$i]);
            $atts = self::shortcode_parse_atts($attr);
            $id = md5($siteurl.$atts['url']);
            $result = array(
                'url' => $atts['url'] ? $atts['url'] : '',
                'pic' => $atts['pic'] ? $atts['pic'] : '');
            if (empty($result)) return '';
            if (empty($theme)) $theme = '#FADFA3';
            $data = array(
                'id' => $id,
                'autoplay' => false,
                'theme' => $theme);
            $data['autoplay'] = ($atts['autoplay'] == 'true') ? true : false;
            $data['theme'] = $atts['theme'] ? $atts['autoplay'] : $theme;
            $data['video'] = $result;
            $danmaku = array(
                'id' => md5($id),
                'token' => md5(md5($id) . date('YmdH', time())),
                'api' => $dmserver,);
            $data['danmaku'] = ($atts['danmu'] != 'false') ? $danmaku : null;
            if (empty($dmserver)) $data['danmaku'] = null;
            $js = json_encode($data);
            $src = "<div id=\"player".$id."\" class=\"dplayer\">如无显示请刷新本页，播放器暂不支持Pjax无刷新加载</div><script>dPlayerOptions.push(".$js.");</script>";
            if (empty($out)) {
                $out = str_replace($matches[0][$i], $src, $post);
            } else {
                $out = str_replace($matches[0][$i], $src, $out);
            }
        }
        return $out;
    }<commit_msg>修正自定义颜色<commit_after><?php
class dplayer_class
{
    function parseCallback($post,$siteurl,$dmserver,$theme) {
        $pattern = self::get_shortcode_regex(array('dplayer'));
        preg_match_all("/$pattern/",$post,$matches);
        if (empty($matches[0])) {
            return $post;
        }
        if ($matches[1] == '[' && $matches[6] == ']') {
            return substr($matches[0], 1, -1);
        }
        for ($i=0;$i<count($matches[3]);$i++) {
            $attr = htmlspecialchars_decode($matches[3][$i]);
            $atts = self::shortcode_parse_atts($attr);
            $id = md5($siteurl.$atts['url']);
            $result = array(
                'url' => $atts['url'] ? $atts['url'] : '',
                'pic' => $atts['pic'] ? $atts['pic'] : '');
            if (empty($result)) return '';
            if (empty($theme)) $theme = '#FADFA3';
            $data = array(
                'id' => $id,
                'autoplay' => false,
                'theme' => $theme);
            $data['autoplay'] = ($atts['autoplay'] == 'true') ? true : false;
            $data['theme'] = $atts['theme'] ? $atts['theme'] : $theme;
            $data['video'] = $result;
            $danmaku = array(
                'id' => md5($id),
                'token' => md5(md5($id) . date('YmdH', time())),
                'api' => $dmserver,);
            $data['danmaku'] = ($atts['danmu'] != 'false') ? $danmaku : null;
            if (empty($dmserver)) $data['danmaku'] = null;
            $js = json_encode($data);
            $src = "<div id=\"player".$id."\" class=\"dplayer\">如无显示请刷新本页，播放器暂不支持Pjax无刷新加载</div><script>dPlayerOptions.push(".$js.");</script>";
            if (empty($out)) {
                $out = str_replace($matches[0][$i], $src, $post);
            } else {
                $out = str_replace($matches[0][$i], $src, $out);
            }
        }
        return $out;
    }
{'fraction_non_alphanumeric': 0.21948017852454713, 'fraction_numerical': 0.00840115515883434, 'mean_word_length': 1.9150726855394031, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 27, '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': '6456794', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1268, 'n_words': 198}