Index: trunk/phase3/includes/Parser.php |
— | — | @@ -963,7 +963,8 @@ |
964 | 964 | # Count the number of occurrences of bold and italics mark-ups. |
965 | 965 | # We are not counting sequences of five apostrophes. |
966 | 966 | if (strlen ($arr[$i]) == 2) $numitalics++; else |
967 | | - if (strlen ($arr[$i]) == 3) $numbold++; |
| 967 | + if (strlen ($arr[$i]) == 3) $numbold++; else |
| 968 | + if (strlen ($arr[$i]) == 5) { $numitalics++; $numbold++; } |
968 | 969 | } |
969 | 970 | $i++; |
970 | 971 | } |
— | — | @@ -1008,7 +1009,9 @@ |
1009 | 1010 | $arr [ $firstmultiletterword-1 ] .= "'"; |
1010 | 1011 | } |
1011 | 1012 | # ... otherwise use the first one that has neither. |
1012 | | - else |
| 1013 | + # (notice that it is possible for all three to be -1 if, for example, |
| 1014 | + # there is only one pentuple-apostrophe in the line) |
| 1015 | + else if ($firstspace > -1) |
1013 | 1016 | { |
1014 | 1017 | $arr [ $firstspace ] = "''"; |
1015 | 1018 | $arr [ $firstspace-1 ] .= "'"; |