如何使用PHP仅缩小指定文件/页面的一部分

How I can use this function to skip specified files and not minify them?

Minifier:

function sanitize_output($buffer) {
  $search = array(
    '/\>[^\S ]+/s',
    '/[^\S ]+\</s',
    '/(\s)+/s',
    '/<!--(.|\s)*?-->/'
  );
  $replace = array(
    '>',
    '<',
    '\\1',
    ''
  );
  $buffer = preg_replace($search, $replace, $buffer);
  return $buffer;
}
ob_start("sanitize_output");

HTML:

// this file contains above minifier
include($_SERVER['DOCUMENT_ROOT'].'/include-minifier.php');


// should be minified
<p style='display:      block'>custom text</p>

// do not minify this file
include($_SERVER['DOCUMENT_ROOT'].'/body.php');

Text here. Text here.

// do not minify this file
ob_flush();
ob_end_clean();
include($_SERVER['DOCUMENT_ROOT'].'/body.php');

If you need minify next code -- call ob_start() manually before code block:

<?php ob_start("sanitize_output"); ?>
...any html...