Code Duplication    Length = 4-4 lines in 3 locations

modules/shortcodes/latex.php 3 locations

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