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

@@ 894-898 (lines=5) @@
891
			$url = $this->encodeURLAttribute($url);
892
893
			$result = "<a href=\"$url\"";
894
			if ( isset( $this->titles[$link_id] ) ) {
895
				$title = $this->titles[$link_id];
896
				$title = $this->encodeAttribute($title);
897
				$result .=  " title=\"$title\"";
898
			}
899
			if (isset($this->ref_attr[$link_id]))
900
				$result .= $this->ref_attr[$link_id];
901
@@ 1017-1021 (lines=5) @@
1014
		if (isset($this->urls[$link_id])) {
1015
			$url = $this->encodeURLAttribute($this->urls[$link_id]);
1016
			$result = "<img src=\"$url\" alt=\"$alt_text\"";
1017
			if (isset($this->titles[$link_id])) {
1018
				$title = $this->titles[$link_id];
1019
				$title = $this->encodeAttribute($title);
1020
				$result .=  " title=\"$title\"";
1021
			}
1022
			if (isset($this->ref_attr[$link_id])) {
1023
				$result .= $this->ref_attr[$link_id];
1024
			}