Code Duplication    Length = 16-18 lines in 2 locations

includes/parser/Parser.php 2 locations

@@ 1702-1717 (lines=16) @@
1699
			} else {
1700
				$thislen = strlen( $r );
1701
				if ( $thislen == 2 ) {
1702
					if ( $state === 'i' ) {
1703
						$output .= '</i>';
1704
						$state = '';
1705
					} elseif ( $state === 'bi' ) {
1706
						$output .= '</i>';
1707
						$state = 'b';
1708
					} elseif ( $state === 'ib' ) {
1709
						$output .= '</b></i><b>';
1710
						$state = 'b';
1711
					} elseif ( $state === 'both' ) {
1712
						$output .= '<b><i>' . $buffer . '</i>';
1713
						$state = 'b';
1714
					} else { // $state can be 'b' or ''
1715
						$output .= '<i>';
1716
						$state .= 'i';
1717
					}
1718
				} elseif ( $thislen == 3 ) {
1719
					if ( $state === 'b' ) {
1720
						$output .= '</b>';
@@ 1718-1735 (lines=18) @@
1715
						$output .= '<i>';
1716
						$state .= 'i';
1717
					}
1718
				} elseif ( $thislen == 3 ) {
1719
					if ( $state === 'b' ) {
1720
						$output .= '</b>';
1721
						$state = '';
1722
					} elseif ( $state === 'bi' ) {
1723
						$output .= '</i></b><i>';
1724
						$state = 'i';
1725
					} elseif ( $state === 'ib' ) {
1726
						$output .= '</b>';
1727
						$state = 'i';
1728
					} elseif ( $state === 'both' ) {
1729
						$output .= '<i><b>' . $buffer . '</b>';
1730
						$state = 'i';
1731
					} else { // $state can be 'i' or ''
1732
						$output .= '<b>';
1733
						$state .= 'b';
1734
					}
1735
				} elseif ( $thislen == 5 ) {
1736
					if ( $state === 'b' ) {
1737
						$output .= '</b><i>';
1738
						$state = 'i';