Code Duplication    Length = 5-5 lines in 2 locations

Michelf/MarkdownExtra.php 2 locations

@@ 608-612 (lines=5) @@
605
				preg_match('{^</?(?:' . $enclosing_tag_re . ')\b}', $tag))
606
			{
607
				// Increase/decrease nested tag count.
608
				if ($tag{1} === '/') {
609
					$depth--;
610
				} else if ($tag{strlen($tag)-2} !== '/') {
611
					$depth++;
612
				}
613
614
				if ($depth < 0) {
615
					// Going out of parent element. Clean up and break so we
@@ 731-735 (lines=5) @@
728
				// Increase/decrease nested tag count. Only do so if
729
				// the tag's name match base tag's.
730
				if (preg_match('{^</?' . $base_tag_name_re . '\b}', $tag)) {
731
					if ($tag{1} === '/') {
732
						$depth--;
733
					} else if ($tag{strlen($tag)-2} !== '/') {
734
						$depth++;
735
					}
736
				}
737
738
				// Check for `markdown="1"` attribute and handle it.