From: Arne Heizmann Date: Sat, 14 Aug 2004 08:32:57 +0000 (+0000) Subject: Fixes to the bold/italics rendering problems [Bug 40] X-Git-Tag: 1.5.0alpha1~2371 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=69eaf5751bfb2901d45c8805ab2db7e0900ea708;p=lhc%2Fweb%2Fwiklou.git Fixes to the bold/italics rendering problems [Bug 40] http://bugzilla.wikipedia.org/show_bug.cgi?id=40 --- diff --git a/includes/Parser.php b/includes/Parser.php index a3d285794f..09fd92b7b5 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -963,7 +963,8 @@ class Parser # 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 @@ class Parser $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 ] .= "'";