protected function nospaces(string $template): string
	{
		// Compile regular nospace blocks

		$template = preg_replace_callback('/{%\s*nospace\s*%}(.*?){%\s*endnospace\s*%}/is', function($matches)
		{
			return trim(preg_replace('/>\s+</', '><', $matches[1]));
		}, $template);

		// Compile buffered nospace blocks

		$template = preg_replace('/{%\s*nospace:buffered\s*%}(.*?){%\s*endnospace\s*%}/is', '<?php ob_start(); ?>$1<?php echo trim(preg_replace(\'/>\s+</\', \'><\', ob_get_clean())); ?>', $template);

		return $template;
	}