Code Duplication    Length = 5-5 lines in 4 locations

Michelf/Markdown.php 2 locations

@@ 749-753 (lines=5) @@
746
			$url = $this->encodeURLAttribute($url);
747
748
			$result = "<a href=\"$url\"";
749
			if ( isset( $this->titles[$link_id] ) ) {
750
				$title = $this->titles[$link_id];
751
				$title = $this->encodeAttribute($title);
752
				$result .=  " title=\"$title\"";
753
			}
754
755
			$link_text = $this->runSpanGamut($link_text);
756
			$result .= ">$link_text</a>";
@@ 868-872 (lines=5) @@
865
		if (isset($this->urls[$link_id])) {
866
			$url = $this->encodeURLAttribute($this->urls[$link_id]);
867
			$result = "<img src=\"$url\" alt=\"$alt_text\"";
868
			if (isset($this->titles[$link_id])) {
869
				$title = $this->titles[$link_id];
870
				$title = $this->encodeAttribute($title);
871
				$result .=  " title=\"$title\"";
872
			}
873
			$result .= $this->empty_element_suffix;
874
			$result = $this->hashPart($result);
875
		} else {

Michelf/MarkdownExtra.php 2 locations

@@ 879-883 (lines=5) @@
876
			$url = $this->encodeURLAttribute($url);
877
878
			$result = "<a href=\"$url\"";
879
			if ( isset( $this->titles[$link_id] ) ) {
880
				$title = $this->titles[$link_id];
881
				$title = $this->encodeAttribute($title);
882
				$result .=  " title=\"$title\"";
883
			}
884
			if (isset($this->ref_attr[$link_id]))
885
				$result .= $this->ref_attr[$link_id];
886
@@ 1003-1007 (lines=5) @@
1000
		if (isset($this->urls[$link_id])) {
1001
			$url = $this->encodeURLAttribute($this->urls[$link_id]);
1002
			$result = "<img src=\"$url\" alt=\"$alt_text\"";
1003
			if (isset($this->titles[$link_id])) {
1004
				$title = $this->titles[$link_id];
1005
				$title = $this->encodeAttribute($title);
1006
				$result .=  " title=\"$title\"";
1007
			}
1008
			if (isset($this->ref_attr[$link_id]))
1009
				$result .= $this->ref_attr[$link_id];
1010
			$result .= $this->empty_element_suffix;