1.20.x diff.inc | public HWLDFWordAccumulator::addWords($words, $tag = '') |
Parameters
$words:
$tag string:
File
- includes/
diff.inc, line 871 - A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)
Class
- HWLDFWordAccumulator
- @private
Code
public function addWords($words, $tag = '') {
if ($tag != $this->tag) {
$this->flushGroup($tag);
}
foreach ($words as $word) {
// new-line should only come as first char of word.
if ($word == '') {
continue;
}
if ($word[0] == "\n") {
$this->flushLine($tag);
$word = substr($word, 1);
}
assert(!strstr($word, "\n"));
$this->group .= $word;
}
}