Remove redundant code
This commit is contained in:
parent
c7d9f00965
commit
dd9d52400e
30
src/Row.php
30
src/Row.php
@ -413,36 +413,6 @@ class Row {
|
||||
|
||||
$findKeywords($keywords1, Highlight::KEYWORD1);
|
||||
$findKeywords($keywords2, Highlight::KEYWORD2);
|
||||
|
||||
/* foreach ($keywords1 as $k)
|
||||
{
|
||||
$klen = strlen($k);
|
||||
$nextCharOffset = $i + $klen;
|
||||
$isEndOfLine = $nextCharOffset >= $this->rsize;
|
||||
$nextChar = ($isEndOfLine) ? "\0" : $this->render[$nextCharOffset];
|
||||
|
||||
if (substr($this->render, $i, $klen) === $k && is_separator($nextChar))
|
||||
{
|
||||
array_replace_range($this->hl, $i, $klen, Highlight::KEYWORD1);
|
||||
$i += $klen - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($keywords2 as $k)
|
||||
{
|
||||
$klen = strlen($k);
|
||||
$nextCharOffset = $i + $klen;
|
||||
$isEndOfLine = $nextCharOffset >= $this->rsize;
|
||||
$nextChar = ($isEndOfLine) ? "\0" : $this->render[$nextCharOffset];
|
||||
|
||||
if (substr($this->render, $i, $klen) === $k && is_separator($nextChar))
|
||||
{
|
||||
array_replace_range($this->hl, $i, $klen, Highlight::KEYWORD2);
|
||||
$i += $klen - 1;
|
||||
break;
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
$prevSep = is_separator($char);
|
||||
|
Loading…
Reference in New Issue
Block a user