@@ 597-601 (lines=5) @@ | ||
594 | preg_match('{^</?(?:' . $enclosing_tag_re . ')\b}', $tag)) |
|
595 | { |
|
596 | // Increase/decrease nested tag count. |
|
597 | if ($tag{1} === '/') { |
|
598 | $depth--; |
|
599 | } else if ($tag{strlen($tag)-2} !== '/') { |
|
600 | $depth++; |
|
601 | } |
|
602 | ||
603 | if ($depth < 0) { |
|
604 | // Going out of parent element. Clean up and break so we |
|
@@ 720-724 (lines=5) @@ | ||
717 | // Increase/decrease nested tag count. Only do so if |
|
718 | // the tag's name match base tag's. |
|
719 | if (preg_match('{^</?' . $base_tag_name_re . '\b}', $tag)) { |
|
720 | if ($tag{1} === '/') { |
|
721 | $depth--; |
|
722 | } else if ($tag{strlen($tag)-2} !== '/') { |
|
723 | $depth++; |
|
724 | } |
|
725 | } |
|
726 | ||
727 | // Check for `markdown="1"` attribute and handle it. |