Index: includes/Parser.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Parser.php,v
retrieving revision 1.358
diff -u -r1.358 Parser.php
--- includes/Parser.php	7 Dec 2004 01:23:32 -0000	1.358
+++ includes/Parser.php	8 Dec 2004 13:21:28 -0000
@@ -891,42 +891,42 @@
 				{
 					if (strlen ($r) == 2)
 					{
-						if ($state == 'i')
-						{ $output .= '</i>'; $state = ''; }
-						else if ($state == 'bi')
-						{ $output .= '</i>'; $state = 'b'; }
-						else if ($state == 'ib')
-						{ $output .= '</b></i><b>'; $state = 'b'; }
+						if ($state == 'em')
+						{ $output .= '</em>'; $state = ''; }
+						else if ($state == 'strongem')
+						{ $output .= '</em>'; $state = 'strong'; }
+						else if ($state == 'emstrong')
+						{ $output .= '</strong></em><strong>'; $state = 'strong'; }
 						else if ($state == 'both')
-						{ $output .= '<b><i>'.$buffer.'</i>'; $state = 'b'; }
-						else # $state can be 'b' or ''
-						{ $output .= '<i>'; $state .= 'i'; }
+						{ $output .= '<strong><em>'.$buffer.'</em>'; $state = 'strong'; }
+						else # $state can be 'strong' or ''
+						{ $output .= '<em>'; $state .= 'em'; }
 					}
 					else if (strlen ($r) == 3)
 					{
-						if ($state == 'b')
-						{ $output .= '</b>'; $state = ''; }
-						else if ($state == 'bi')
-						{ $output .= '</i></b><i>'; $state = 'i'; }
-						else if ($state == 'ib')
-						{ $output .= '</b>'; $state = 'i'; }
+						if ($state == 'strong')
+						{ $output .= '</strong>'; $state = ''; }
+						else if ($state == 'strongem')
+						{ $output .= '</em></strong><em>'; $state = 'em'; }
+						else if ($state == 'emstrong')
+						{ $output .= '</strong>'; $state = 'em'; }
 						else if ($state == 'both')
-						{ $output .= '<i><b>'.$buffer.'</b>'; $state = 'i'; }
-						else # $state can be 'i' or ''
-						{ $output .= '<b>'; $state .= 'b'; }
+						{ $output .= '<em><strong>'.$buffer.'</strong>'; $state = 'em'; }
+						else # $state can be 'em' or ''
+						{ $output .= '<strong>'; $state .= 'strong'; }
 					}
 					else if (strlen ($r) == 5)
 					{
-						if ($state == 'b')
-						{ $output .= '</b><i>'; $state = 'i'; }
-						else if ($state == 'i')
-						{ $output .= '</i><b>'; $state = 'b'; }
-						else if ($state == 'bi')
-						{ $output .= '</i></b>'; $state = ''; }
-						else if ($state == 'ib')
-						{ $output .= '</b></i>'; $state = ''; }
+						if ($state == 'strong')
+						{ $output .= '</strong><em>'; $state = 'em'; }
+						else if ($state == 'em')
+						{ $output .= '</em><strong>'; $state = 'strong'; }
+						else if ($state == 'strongem')
+						{ $output .= '</em></strong>'; $state = ''; }
+						else if ($state == 'emstrong')
+						{ $output .= '</strong></em>'; $state = ''; }
 						else if ($state == 'both')
-						{ $output .= '<i><b>'.$buffer.'</b></i>'; $state = ''; }
+						{ $output .= '<em><strong>'.$buffer.'</strong></em>'; $state = ''; }
 						else # ($state == '')
 						{ $buffer = ''; $state = 'both'; }
 					}
@@ -934,14 +934,14 @@
 				$i++;
 			}
 			# Now close all remaining tags.  Notice that the order is important.
-			if ($state == 'b' || $state == 'ib')
-				$output .= '</b>';
-			if ($state == 'i' || $state == 'bi' || $state == 'ib')
-				$output .= '</i>';
-			if ($state == 'bi')
-				$output .= '</b>';
+			if ($state == 'strong' || $state == 'emstrong')
+				$output .= '</strong>';
+			if ($state == 'em' || $state == 'strongem' || $state == 'emstrong')
+				$output .= '</em>';
+			if ($state == 'strongem')
+				$output .= '</strong>';
 			if ($state == 'both')
-				$output .= '<b><i>'.$buffer.'</i></b>';
+				$output .= '<strong><em>'.$buffer.'</em></strong>';
 			return $output;
 		}
 	}
