Code Duplication    Length = 16-18 lines in 2 locations

includes/parser/Parser.php 2 locations

@@ 1672-1687 (lines=16) @@
1669
			} else {
1670
				$thislen = strlen( $r );
1671
				if ( $thislen == 2 ) {
1672
					if ( $state === 'i' ) {
1673
						$output .= '</i>';
1674
						$state = '';
1675
					} elseif ( $state === 'bi' ) {
1676
						$output .= '</i>';
1677
						$state = 'b';
1678
					} elseif ( $state === 'ib' ) {
1679
						$output .= '</b></i><b>';
1680
						$state = 'b';
1681
					} elseif ( $state === 'both' ) {
1682
						$output .= '<b><i>' . $buffer . '</i>';
1683
						$state = 'b';
1684
					} else { // $state can be 'b' or ''
1685
						$output .= '<i>';
1686
						$state .= 'i';
1687
					}
1688
				} elseif ( $thislen == 3 ) {
1689
					if ( $state === 'b' ) {
1690
						$output .= '</b>';
@@ 1688-1705 (lines=18) @@
1685
						$output .= '<i>';
1686
						$state .= 'i';
1687
					}
1688
				} elseif ( $thislen == 3 ) {
1689
					if ( $state === 'b' ) {
1690
						$output .= '</b>';
1691
						$state = '';
1692
					} elseif ( $state === 'bi' ) {
1693
						$output .= '</i></b><i>';
1694
						$state = 'i';
1695
					} elseif ( $state === 'ib' ) {
1696
						$output .= '</b>';
1697
						$state = 'i';
1698
					} elseif ( $state === 'both' ) {
1699
						$output .= '<i><b>' . $buffer . '</b>';
1700
						$state = 'i';
1701
					} else { // $state can be 'i' or ''
1702
						$output .= '<b>';
1703
						$state .= 'b';
1704
					}
1705
				} elseif ( $thislen == 5 ) {
1706
					if ( $state === 'b' ) {
1707
						$output .= '</b><i>';
1708
						$state = 'i';