$escape = false;
$replace =
$this->
parsePair($key,
$val,
$template);
} else { $replace =
$this->
parseSingle($key,
(string) $val);
} foreach ($replace as $pattern =>
$content) { $template =
$this->
replaceSingle($pattern,
$content,
$template,
$escape);
} } return $this->
insertNoparse($template);
} /**
* Parse a single key/value, extracting it
*/
protected function parseSingle(string
$key, string
$val): array
{ $pattern = '#' .
$this->leftDelimiter . '!?\s*' .
preg_quote($key, '#'
) . '(?(?=\s*\|\s*)(\s*\|*\s*([|\w<>=\(\),:.\-\s\+\\\\/]+)*\s*))(\s*)!?'
.
$this->rightDelimiter . '#ums';