Code Duplication    Length = 4-4 lines in 3 locations

modules/latex.php 3 locations

@@ 61-64 (lines=4) @@
58
59
60
	$latex = latex_entity_decode( $latex );
61
	if ( preg_match( '/.+(&fg=[0-9a-f]{6}).*/i', $latex, $fg_matches ) ) {
62
		$fg = substr( $fg_matches[1], 4 );
63
		$latex = str_replace( $fg_matches[1], '', $latex );
64
	}
65
	if ( preg_match( '/.+(&bg=[0-9a-f]{6}).*/i', $latex, $bg_matches ) ) {
66
		$bg = substr( $bg_matches[1], 4 );
67
		$latex = str_replace( $bg_matches[1], '', $latex );
@@ 65-68 (lines=4) @@
62
		$fg = substr( $fg_matches[1], 4 );
63
		$latex = str_replace( $fg_matches[1], '', $latex );
64
	}
65
	if ( preg_match( '/.+(&bg=[0-9a-f]{6}).*/i', $latex, $bg_matches ) ) {
66
		$bg = substr( $bg_matches[1], 4 );
67
		$latex = str_replace( $bg_matches[1], '', $latex );
68
	}
69
	if ( preg_match( '/.+(&s=[0-9-]{1,2}).*/i', $latex, $s_matches ) ) {
70
		$s = (int) substr( $s_matches[1], 3 );
71
		$latex = str_replace( $s_matches[1], '', $latex );
@@ 69-72 (lines=4) @@
66
		$bg = substr( $bg_matches[1], 4 );
67
		$latex = str_replace( $bg_matches[1], '', $latex );
68
	}
69
	if ( preg_match( '/.+(&s=[0-9-]{1,2}).*/i', $latex, $s_matches ) ) {
70
		$s = (int) substr( $s_matches[1], 3 );
71
		$latex = str_replace( $s_matches[1], '', $latex );
72
	}
73
74
	return latex_render( $latex, $fg, $bg, $s );
75
}