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>";
@@ 867-871 (lines=5) @@
864
		if (isset($this->urls[$link_id])) {
865
			$url = $this->encodeURLAttribute($this->urls[$link_id]);
866
			$result = "<img src=\"$url\" alt=\"$alt_text\"";
867
			if (isset($this->titles[$link_id])) {
868
				$title = $this->titles[$link_id];
869
				$title = $this->encodeAttribute($title);
870
				$result .=  " title=\"$title\"";
871
			}
872
			$result .= $this->empty_element_suffix;
873
			$result = $this->hashPart($result);
874
		} else {

Michelf/MarkdownExtra.php 2 locations

@@ 905-909 (lines=5) @@
902
			$url = $this->encodeURLAttribute($url);
903
904
			$result = "<a href=\"$url\"";
905
			if ( isset( $this->titles[$link_id] ) ) {
906
				$title = $this->titles[$link_id];
907
				$title = $this->encodeAttribute($title);
908
				$result .=  " title=\"$title\"";
909
			}
910
			if (isset($this->ref_attr[$link_id]))
911
				$result .= $this->ref_attr[$link_id];
912
@@ 1028-1032 (lines=5) @@
1025
		if (isset($this->urls[$link_id])) {
1026
			$url = $this->encodeURLAttribute($this->urls[$link_id]);
1027
			$result = "<img src=\"$url\" alt=\"$alt_text\"";
1028
			if (isset($this->titles[$link_id])) {
1029
				$title = $this->titles[$link_id];
1030
				$title = $this->encodeAttribute($title);
1031
				$result .=  " title=\"$title\"";
1032
			}
1033
			if (isset($this->ref_attr[$link_id])) {
1034
				$result .= $this->ref_attr[$link_id];
1035
			}