StackFormation\Preprocessor::stripComments PHP Метод

stripComments() защищенный Метод

protected stripComments ( $json )
    protected function stripComments($json)
    {
        // there's a problem with '"http://example.com"' being converted to '"http:'
        // $json = preg_replace('~//[^\r\n]*|/\*.*?\*/~s', '', $json);
        // there's a problem with "arn:aws:s3:::my-bucket/*"
        // $json = preg_replace('~/\*.*?\*/~s', '', $json);
        // quick workaround: don't allow quotes
        $json = preg_replace('~/\\*[^"]*?\\*/~s', '', $json);
        return $json;
    }