Index: includes/Parser.php =================================================================== RCS file: /cvsroot/wikipedia/phase3/includes/Parser.php,v retrieving revision 1.237 diff -u -b -r1.237 Parser.php --- includes/Parser.php 12 Aug 2004 13:58:54 -0000 1.237 +++ includes/Parser.php 14 Aug 2004 07:26:59 -0000 @@ -963,7 +963,8 @@ # Count the number of occurrences of bold and italics mark-ups. # We are not counting sequences of five apostrophes. if (strlen ($arr[$i]) == 2) $numitalics++; else - if (strlen ($arr[$i]) == 3) $numbold++; + if (strlen ($arr[$i]) == 3) $numbold++; else + if (strlen ($arr[$i]) == 5) { $numitalics++; $numbold++; } } $i++; } @@ -1008,7 +1009,9 @@ $arr [ $firstmultiletterword-1 ] .= "'"; } # ... otherwise use the first one that has neither. - else + # (notice that it is possible for all three to be -1 if, for example, + # there is only one pentuple-apostrophe in the line) + else if ($firstspace > -1) { $arr [ $firstspace ] = "''"; $arr [ $firstspace-1 ] .= "'";