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>";
@@ 871-875 (lines=5) @@
868
			if(isset($width)) $result .= " width=\"$width\"";
869
			if(isset($height)) $result .= " height=\"$height\"";
870
			if(isset($width) && isset($height)) $result .= " loading=\"lazy\"";
871
			if (isset($this->titles[$link_id])) {
872
				$title = $this->titles[$link_id];
873
				$title = $this->encodeAttribute($title);
874
				$result .=  " title=\"$title\"";
875
			}
876
			$result .= $this->empty_element_suffix;
877
			$result = $this->hashPart($result);
878
		} 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
@@ 1037-1041 (lines=5) @@
1034
			if(isset($width)) $result .= " width=\"$width\"";
1035
			if(isset($height)) $result .= " height=\"$height\"";
1036
			if(isset($width) && isset($height)) $result .= " loading=\"lazy\"";
1037
			if (isset($this->titles[$link_id])) {
1038
				$title = $this->titles[$link_id];
1039
				$title = $this->encodeAttribute($title);
1040
				$result .=  " title=\"$title\"";
1041
			}
1042
			if (isset($this->ref_attr[$link_id])) {
1043
				$result .= $this->ref_attr[$link_id];
1044
			}