r4747 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r4746‎ | r4747 | r4748 >
Date:08:32, 14 August 2004
Author:timwi
Status:old
Tags:
Comment:
Fixes to the bold/italics rendering problems [Bug 40]
http://bugzilla.wikipedia.org/show_bug.cgi?id=40
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -963,7 +963,8 @@
964964 # Count the number of occurrences of bold and italics mark-ups.
965965 # We are not counting sequences of five apostrophes.
966966 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++; }
968969 }
969970 $i++;
970971 }
@@ -1008,7 +1009,9 @@
10091010 $arr [ $firstmultiletterword-1 ] .= "'";
10101011 }
10111012 # ... 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)
10131016 {
10141017 $arr [ $firstspace ] = "''";
10151018 $arr [ $firstspace-1 ] .= "'";

Follow-up revisions

RevisionCommit summaryAuthorDate
r61519Parser documentation:...platonides16:16, 26 January 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r4746Fixes to the bold/italics rendering problems [Bug 40]...timwi08:32, 14 August 2004

Status & tagging log