Skip to content

Commit

Permalink
OUWiki: Bold change counted in History Changes screen #6948
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-platts authored and sammarshallou committed Jun 20, 2013
1 parent e57ca3c commit 43eb3d9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions difflib.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,18 @@ public function __construct($data, $linepos) {
// Aaaand find the next space after that
$space2 = strpos($data, ' ', $pos);
if ($space2 === false) {
// No more spaces? Everything left must be a word
$this->words[] = new ouwiki_word(substr($data, $pos), $pos+$linepos);
// No more spaces? Everything left must be a word.
$word = ltrim(substr($data, $pos), chr(0xC2) . chr(0xA0));
if (!empty($word)) {
$this->words[] = new ouwiki_word($word, $pos + $linepos);
}
break;
} else {
$this->words[] = new ouwiki_word(substr($data, $pos, $space2-$pos), $pos+$linepos);
// Specially trim nbsp; see http://www.php.net/manual/en/function.trim.php#98812.
$word = trim(substr($data, $pos, $space2-$pos), chr(0xC2) . chr(0xA0));
if (!empty($word)) {
$this->words[] = new ouwiki_word($word, $pos + $linepos);
}
$pos = $space2;
}
}
Expand Down

0 comments on commit 43eb3d9

Please sign in to comment.