Code Duplication    Length = 5-5 lines in 4 locations

projects/plugins/jetpack/_inc/lib/markdown/extra.php 4 locations

@@ 636-640 (lines=5) @@
633
			$url = $this->encodeAttribute($url);
634
635
			$result = "<a href=\"$url\"";
636
			if ( isset( $this->titles[$link_id] ) ) {
637
				$title = $this->titles[$link_id];
638
				$title = $this->encodeAttribute($title);
639
				$result .=  " title=\"$title\"";
640
			}
641
642
			$link_text = $this->runSpanGamut($link_text);
643
			$result .= ">$link_text</a>";
@@ 740-744 (lines=5) @@
737
		if (isset($this->urls[$link_id])) {
738
			$url = $this->encodeAttribute($this->urls[$link_id]);
739
			$result = "<img src=\"$url\" alt=\"$alt_text\"";
740
			if (isset($this->titles[$link_id])) {
741
				$title = $this->titles[$link_id];
742
				$title = $this->encodeAttribute($title);
743
				$result .=  " title=\"$title\"";
744
			}
745
			$result .= $this->empty_element_suffix;
746
			$result = $this->hashPart($result);
747
		}
@@ 2320-2324 (lines=5) @@
2317
			$url = $this->encodeAttribute($url);
2318
2319
			$result = "<a href=\"$url\"";
2320
			if ( isset( $this->titles[$link_id] ) ) {
2321
				$title = $this->titles[$link_id];
2322
				$title = $this->encodeAttribute($title);
2323
				$result .=  " title=\"$title\"";
2324
			}
2325
			if (isset($this->ref_attr[$link_id]))
2326
				$result .= $this->ref_attr[$link_id];
2327
@@ 2430-2434 (lines=5) @@
2427
		if (isset($this->urls[$link_id])) {
2428
			$url = $this->encodeAttribute($this->urls[$link_id]);
2429
			$result = "<img src=\"$url\" alt=\"$alt_text\"";
2430
			if (isset($this->titles[$link_id])) {
2431
				$title = $this->titles[$link_id];
2432
				$title = $this->encodeAttribute($title);
2433
				$result .=  " title=\"$title\"";
2434
			}
2435
			if (isset($this->ref_attr[$link_id]))
2436
				$result .= $this->ref_attr[$link_id];
2437
			$result .= $this->empty_element_suffix;