Code Duplication    Length = 17-19 lines in 2 locations

vendors/markdown/markdown.php 2 locations

@@ 791-809 (lines=19) @@
788
		}
789
		return $result;
790
	}
791
	function _doAnchors_inline_callback($matches) {
792
		$whole_match	=  $matches[1];
793
		$link_text		=  $this->runSpanGamut($matches[2]);
794
		$url			=  $matches[3] == '' ? $matches[4] : $matches[3];
795
		$title			=& $matches[7];
796
797
		$url = $this->encodeAttribute($url);
798
799
		$result = "<a href=\"$url\"";
800
		if (isset($title)) {
801
			$title = $this->encodeAttribute($title);
802
			$result .=  " title=\"$title\"";
803
		}
804
		
805
		$link_text = $this->runSpanGamut($link_text);
806
		$result .= ">$link_text</a>";
807
808
		return $this->hashPart($result);
809
	}
810
811
812
	function doImages($text) {
@@ 895-911 (lines=17) @@
892
893
		return $result;
894
	}
895
	function _doImages_inline_callback($matches) {
896
		$whole_match	= $matches[1];
897
		$alt_text		= $matches[2];
898
		$url			= $matches[3] == '' ? $matches[4] : $matches[3];
899
		$title			=& $matches[7];
900
901
		$alt_text = $this->encodeAttribute($alt_text);
902
		$url = $this->encodeAttribute($url);
903
		$result = "<img src=\"$url\" alt=\"$alt_text\"";
904
		if (isset($title)) {
905
			$title = $this->encodeAttribute($title);
906
			$result .=  " title=\"$title\""; # $title already quoted
907
		}
908
		$result .= $this->empty_element_suffix;
909
910
		return $this->hashPart($result);
911
	}
912
913
914
	function doHeaders($text) {