@@ 2011-2012 (lines=2) @@ | ||
2008 | # |
|
2009 | # Increase/decrease nested tag count. |
|
2010 | # |
|
2011 | if ($tag{1} == '/') $depth--; |
|
2012 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
2013 | ||
2014 | if ($depth < 0) { |
|
2015 | # |
|
@@ 2139-2140 (lines=2) @@ | ||
2136 | # the tag's name match base tag's. |
|
2137 | # |
|
2138 | if (preg_match('{^</?'.$base_tag_name_re.'\b}', $tag)) { |
|
2139 | if ($tag{1} == '/') $depth--; |
|
2140 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
2141 | } |
|
2142 | ||
2143 | # |