Skip to content

Commit 3ade06e

Browse files
committed
some update
1 parent b4db25a commit 3ade06e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
302 KB
Loading

src/Style/Highlighter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,14 @@ private function lineNumbers(array $lines, $markLine = null)
287287
foreach ($lines as $i => $line) {
288288
if ($markLine !== null) {
289289
$snippet .= ($markLine === $i + 1 ? $this->color->apply($lmStyle, ' > ') : ' ');
290+
$snippet .= $this->color->apply(
291+
$markLine === $i + 1 ? $lmStyle : $lnStyle,
292+
str_pad($i + 1, $lineLen, ' ', STR_PAD_LEFT) . '| '
293+
);
294+
} else {
295+
$snippet .= $this->color->apply($lnStyle, str_pad($i + 1, $lineLen, ' ', STR_PAD_LEFT) . '| ');
290296
}
291297

292-
$snippet .= $this->color->apply($lnStyle, str_pad($i + 1, $lineLen, ' ', STR_PAD_LEFT) . '| ');
293298
$snippet .= $line . PHP_EOL;
294299
}
295300

0 commit comments

Comments
 (0)