public function process(MinifyContext $context)
    {
        return $context->setContents(preg_replace_callback(
            '/
                <!          # search for the start of a comment
                    [^>]*   # search for everything without a ">"
                >           # match the end of the comment
            /xs', function ($match) {
            if (Str::contains(strtolower($match[0]), 'doctype')) {
                return $match[0];
            }

            return '';
        }, $context->getContents()));
    }
public function process(MinifyContext $context)
    {
        return $context->setContents(preg_replace_callback(
            '/
                <!          # search for the start of a comment
                    [^>]*   # search for everything without a ">"
                >           # match the end of the comment
            /xs', function ($match) {
            if (Str::contains(strtolower($match[0]), 'doctype')) {
                return $match[0];
            }

            return '';
        }, $context->getContents()));
    }
public function process ( MinifyContext $ context ) { return $ context -> setContents ( preg_replace_callback ( '/
                <!          # search for the start of a comment
                    [^>]*   # search for everything without a ">"
                >           # match the end of the comment
            /xs' , function ( $ match ) { if ( Str :: contains ( strtolower ( $ match [ 0 ] ) , 'doctype' ) ) { return $ match [ 0 ] ; } return '' ; } , $ context -> getContents ( ) ) ) ; }
Replace remaining comments.

@param \ArjanSchouten\HtmlMinifier\MinifyContext $context

@return \ArjanSchouten\HtmlMinifier\MinifyContext
Replace remaining comments .