| @@ 498-499 (lines=2) @@ | ||
| 495 | # |
|
| 496 | # Increase/decrease nested tag count. |
|
| 497 | # |
|
| 498 | if ($tag{1} == '/') $depth--; |
|
| 499 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
| 500 | ||
| 501 | if ($depth < 0) { |
|
| 502 | # |
|
| @@ 626-627 (lines=2) @@ | ||
| 623 | # the tag's name match base tag's. |
|
| 624 | # |
|
| 625 | if (preg_match('{^</?'.$base_tag_name_re.'\b}', $tag)) { |
|
| 626 | if ($tag{1} == '/') $depth--; |
|
| 627 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
| 628 | } |
|
| 629 | ||
| 630 | # |
|