| @@ 2319-2323 (lines=5) @@ | ||
| 2316 | # |
|
| 2317 | # Increase/decrease nested tag count. |
|
| 2318 | # |
|
| 2319 | if ($tag{1} == '/') { |
|
| 2320 | $depth --; |
|
| 2321 | } else if ($tag{strlen($tag) - 2} != '/') { |
|
| 2322 | $depth ++; |
|
| 2323 | } |
|
| 2324 | ||
| 2325 | if ($depth < 0) { |
|
| 2326 | # |
|
| @@ 2453-2457 (lines=5) @@ | ||
| 2450 | # the tag's name match base tag's. |
|
| 2451 | # |
|
| 2452 | if (preg_match('{^</?' . $base_tag_name_re . '\b}', $tag)) { |
|
| 2453 | if ($tag{1} == '/') { |
|
| 2454 | $depth --; |
|
| 2455 | } else if ($tag{strlen($tag) - 2} != '/') { |
|
| 2456 | $depth ++; |
|
| 2457 | } |
|
| 2458 | } |
|
| 2459 | ||
| 2460 | # |
|