public function processCustomizeRuleSelector( $selector,
                                                  array $paragraphIdMap )
    {
        return preg_replace_callback(
            '/#paragraph-(-?\d+)/',
            function ( $matches ) use ( $paragraphIdMap )
            {
                $id = (string) (int) $matches[1];

                if ( isset( $paragraphIdMap[$id] ) )
                {
                    $id = $paragraphIdMap[$id];
                }

                return '#paragraph-' . $id;
            },
            $selector
        );
    }