@@ 2004-2005 (lines=2) @@ | ||
2001 | # |
|
2002 | # Increase/decrease nested tag count. |
|
2003 | # |
|
2004 | if ($tag{1} == '/') $depth--; |
|
2005 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
2006 | ||
2007 | if ($depth < 0) { |
|
2008 | # |
|
@@ 2138-2139 (lines=2) @@ | ||
2135 | # the tag's name match base tag's. |
|
2136 | # |
|
2137 | if (preg_match('{^</?'.$base_tag_name_re.'\b}', $tag)) { |
|
2138 | if ($tag{1} == '/') $depth--; |
|
2139 | else if ($tag{strlen($tag)-2} != '/') $depth++; |
|
2140 | } |
|
2141 | ||
2142 | # |