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>";
@@ 874-878 (lines=5) @@
871
				if(isset($height)) $result .= " height=\"$height\"";
872
				if(isset($width) && isset($height)) $result .= " loading=\"lazy\"";
873
			}
874
			if (isset($this->titles[$link_id])) {
875
				$title = $this->titles[$link_id];
876
				$title = $this->encodeAttribute($title);
877
				$result .=  " title=\"$title\"";
878
			}
879
			$result .= $this->empty_element_suffix;
880
			$result = $this->hashPart($result);
881
		} else {

Michelf/MarkdownExtra.php 2 locations

@@ 909-913 (lines=5) @@
906
			$url = $this->encodeURLAttribute($url);
907
908
			$result = "<a href=\"$url\"";
909
			if ( isset( $this->titles[$link_id] ) ) {
910
				$title = $this->titles[$link_id];
911
				$title = $this->encodeAttribute($title);
912
				$result .=  " title=\"$title\"";
913
			}
914
			if (isset($this->ref_attr[$link_id]))
915
				$result .= $this->ref_attr[$link_id];
916
@@ 1040-1044 (lines=5) @@
1037
				if(isset($height)) $result .= " height=\"$height\"";
1038
				if(isset($width) && isset($height)) $result .= " loading=\"lazy\"";
1039
			}
1040
			if (isset($this->titles[$link_id])) {
1041
				$title = $this->titles[$link_id];
1042
				$title = $this->encodeAttribute($title);
1043
				$result .=  " title=\"$title\"";
1044
			}
1045
			if (isset($this->ref_attr[$link_id])) {
1046
				$result .= $this->ref_attr[$link_id];
1047
			}