protected function blockMarkup($Line)
{
if ($this->markupEscaped) {
return;
}
if (preg_match('/^<(\\w*)(?:[ ]*' . $this->regexHtmlAttribute . ')*[ ]*(\\/)?>/', $Line['text'], $matches)) {
$element = strtolower($matches[1]);
if (in_array($element, $this->textLevelElements)) {
return;
}
$Block = array('name' => $matches[1], 'depth' => 0, 'markup' => $Line['text']);
$length = strlen($matches[0]);
$remainder = substr($Line['text'], $length);
if (trim($remainder) === '') {
if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) {
$Block['closed'] = true;
$Block['void'] = true;
}
} else {
if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) {
return;
}
if (preg_match('/<\\/' . $matches[1] . '>[ ]*$/i', $remainder)) {
$Block['closed'] = true;
}
}
return $Block;
}
}