You are here

protected function HWLDFWordAccumulator::_flushGroup in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php \Drupal\Component\Diff\Engine\HWLDFWordAccumulator::_flushGroup()
  2. 9 core/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php \Drupal\Component\Diff\Engine\HWLDFWordAccumulator::_flushGroup()
2 calls to HWLDFWordAccumulator::_flushGroup()
HWLDFWordAccumulator::addWords in core/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php
HWLDFWordAccumulator::_flushLine in core/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php

File

core/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php, line 29

Class

HWLDFWordAccumulator
@todo document @private @subpackage DifferenceEngine

Namespace

Drupal\Component\Diff\Engine

Code

protected function _flushGroup($new_tag) {
  if ($this->group !== '') {
    if ($this->tag == 'mark') {
      $this->line = $this->line . '<span class="diffchange">' . $this->group . '</span>';
    }
    else {
      $this->line = $this->line . $this->group;
    }
  }
  $this->group = '';
  $this->tag = $new_tag;
}