Code Duplication    Length = 17-19 lines in 2 locations

system/vendor/Markdown.php 2 locations

@@ 771-789 (lines=19) @@
768
		}
769
		return $result;
770
	}
771
	function _doAnchors_inline_callback($matches) {
772
		$whole_match	=  $matches[1];
773
		$link_text		=  $this->runSpanGamut($matches[2]);
774
		$url			=  $matches[3] == '' ? $matches[4] : $matches[3];
775
		$title			=& $matches[7];
776
777
		$url = $this->encodeAttribute($url);
778
779
		$result = "<a href=\"$url\"";
780
		if (isset($title)) {
781
			$title = $this->encodeAttribute($title);
782
			$result .=  " title=\"$title\"";
783
		}
784
		
785
		$link_text = $this->runSpanGamut($link_text);
786
		$result .= ">$link_text</a>";
787
788
		return $this->hashPart($result);
789
	}
790
791
792
	function doImages($text) {
@@ 875-891 (lines=17) @@
872
873
		return $result;
874
	}
875
	function _doImages_inline_callback($matches) {
876
		$whole_match	= $matches[1];
877
		$alt_text		= $matches[2];
878
		$url			= $matches[3] == '' ? $matches[4] : $matches[3];
879
		$title			=& $matches[7];
880
881
		$alt_text = $this->encodeAttribute($alt_text);
882
		$url = $this->encodeAttribute($url);
883
		$result = "<img src=\"$url\" alt=\"$alt_text\"";
884
		if (isset($title)) {
885
			$title = $this->encodeAttribute($title);
886
			$result .=  " title=\"$title\""; # $title already quoted
887
		}
888
		$result .= $this->empty_element_suffix;
889
890
		return $this->hashPart($result);
891
	}
892
893
894
	function doHeaders($text) {