Code Duplication    Length = 11-11 lines in 2 locations

Michelf/MarkdownExtra.php 2 locations

@@ 539-549 (lines=11) @@
536
				// Fenced code block marker: find matching end marker.
537
				$fence_indent = strlen($capture[1]); // use captured indent in re
538
				$fence_re = $capture[2]; // use captured fence in re
539
				if (preg_match('{^(?>.*\n)*?[ ]{' . ($fence_indent) . '}' . $fence_re . '[ ]*(?:\n|$)}', $text,
540
					$matches))
541
				{
542
					// End marker found: pass text unchanged until marker.
543
					$parsed .= $tag . $matches[0];
544
					$text = substr($text, strlen($matches[0]));
545
				}
546
				else {
547
					// No end marker: just skip it.
548
					$parsed .= $tag;
549
				}
550
			}
551
			// Check for: Indented code block.
552
			else if ($tag{0} === "\n" || $tag{0} === " ") {
@@ 562-572 (lines=11) @@
559
			else if ($tag{0} === "`") {
560
				// Find corresponding end marker.
561
				$tag_re = preg_quote($tag);
562
				if (preg_match('{^(?>.+?|\n(?!\n))*?(?<!`)' . $tag_re . '(?!`)}',
563
					$text, $matches))
564
				{
565
					// End marker found: pass text unchanged until marker.
566
					$parsed .= $tag . $matches[0];
567
					$text = substr($text, strlen($matches[0]));
568
				}
569
				else {
570
					// Unmatched marker: just skip it.
571
					$parsed .= $tag;
572
				}
573
			}
574
			// Check for: Opening Block level tag or
575
			//            Opening Context Block tag (like ins and del)