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 .= ''; $state = ''; }
- else if ($state == 'bi')
- { $output .= ''; $state = 'b'; }
- else if ($state == 'ib')
- { $output .= ''; $state = 'b'; }
+ if ($state == 'em')
+ { $output .= ''; $state = ''; }
+ else if ($state == 'strongem')
+ { $output .= ''; $state = 'strong'; }
+ else if ($state == 'emstrong')
+ { $output .= ''; $state = 'strong'; }
else if ($state == 'both')
- { $output .= ''.$buffer.''; $state = 'b'; }
- else # $state can be 'b' or ''
- { $output .= ''; $state .= 'i'; }
+ { $output .= ''.$buffer.''; $state = 'strong'; }
+ else # $state can be 'strong' or ''
+ { $output .= ''; $state .= 'em'; }
}
else if (strlen ($r) == 3)
{
- if ($state == 'b')
- { $output .= ''; $state = ''; }
- else if ($state == 'bi')
- { $output .= ''; $state = 'i'; }
- else if ($state == 'ib')
- { $output .= ''; $state = 'i'; }
+ if ($state == 'strong')
+ { $output .= ''; $state = ''; }
+ else if ($state == 'strongem')
+ { $output .= ''; $state = 'em'; }
+ else if ($state == 'emstrong')
+ { $output .= ''; $state = 'em'; }
else if ($state == 'both')
- { $output .= ''.$buffer.''; $state = 'i'; }
- else # $state can be 'i' or ''
- { $output .= ''; $state .= 'b'; }
+ { $output .= ''.$buffer.''; $state = 'em'; }
+ else # $state can be 'em' or ''
+ { $output .= ''; $state .= 'strong'; }
}
else if (strlen ($r) == 5)
{
- if ($state == 'b')
- { $output .= ''; $state = 'i'; }
- else if ($state == 'i')
- { $output .= ''; $state = 'b'; }
- else if ($state == 'bi')
- { $output .= ''; $state = ''; }
- else if ($state == 'ib')
- { $output .= ''; $state = ''; }
+ if ($state == 'strong')
+ { $output .= ''; $state = 'em'; }
+ else if ($state == 'em')
+ { $output .= ''; $state = 'strong'; }
+ else if ($state == 'strongem')
+ { $output .= ''; $state = ''; }
+ else if ($state == 'emstrong')
+ { $output .= ''; $state = ''; }
else if ($state == 'both')
- { $output .= ''.$buffer.''; $state = ''; }
+ { $output .= ''.$buffer.''; $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 .= '';
- if ($state == 'i' || $state == 'bi' || $state == 'ib')
- $output .= '';
- if ($state == 'bi')
- $output .= '';
+ if ($state == 'strong' || $state == 'emstrong')
+ $output .= '';
+ if ($state == 'em' || $state == 'strongem' || $state == 'emstrong')
+ $output .= '';
+ if ($state == 'strongem')
+ $output .= '';
if ($state == 'both')
- $output .= ''.$buffer.'';
+ $output .= ''.$buffer.'';
return $output;
}
}