| @@ 2017-2018 (lines=2) @@ | ||
| 2014 | # |
|
| 2015 | # Increase/decrease nested tag count. |
|
| 2016 | # |
|
| 2017 | if ($tag{1} == '/') $depth--; |
|
| 2018 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
| 2019 | ||
| 2020 | if ($depth < 0) { |
|
| 2021 | # |
|
| @@ 2145-2146 (lines=2) @@ | ||
| 2142 | # the tag's name match base tag's. |
|
| 2143 | # |
|
| 2144 | if (preg_match('{^</?'.$base_tag_name_re.'\b}', $tag)) { |
|
| 2145 | if ($tag{1} == '/') $depth--; |
|
| 2146 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
| 2147 | } |
|
| 2148 | ||
| 2149 | # |
|