Code Duplication    Length = 2-2 lines in 2 locations

lib/markdown/markdown.php 1 location

@@ 947-948 (lines=2) @@
944
	}
945
	function _doHeaders_callback_setext($matches) {
946
		# Terrible hack to check we haven't found an empty list item.
947
		if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1]))
948
			return $matches[0];
949
950
		$level = $matches[2]{0} == '=' ? 1 : 2;
951
		$block = "<h$level>".$this->runSpanGamut($matches[1])."</h$level>";

lib/markdown/markdown_extras.php 1 location

@@ 608-609 (lines=2) @@
605
		return " id=\"$attr\"";
606
	}
607
	function _doHeaders_callback_setext($matches) {
608
		if ($matches[3] == '-' && preg_match('{^- }', $matches[1]))
609
			return $matches[0];
610
		$level = $matches[3]{0} == '=' ? 1 : 2;
611
		$attr  = $this->_doHeaders_attr($id =& $matches[2]);
612
		$block = "<h$level$attr>".$this->runSpanGamut($matches[1])."</h$level>";