Skip to content

Commit a3b2079

Browse files
committed
Refactor gutter injection
1 parent d6b0013 commit a3b2079

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Languages/Base/Injections/GutterInjection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ public function parse(string $content, Highlighter $highlighter): ParsedInjectio
6363
$gutterClass = 'hl-gutter' . ($hasClasses ? ' ' . $hasClasses : '');
6464

6565
$lines[$i] = sprintf(
66-
Escape::tokens('<span class="%s">%s</span>'.($highlighter->getTheme() instanceof TerminalTheme ? ' ' : '').'%s'),
66+
Escape::tokens('<span class="%s">%s</span>%s%s'),
6767
$gutterClass,
6868
str_pad(
6969
string: (string) $gutterNumber,
7070
length: $gutterWidth,
7171
pad_type: STR_PAD_LEFT,
7272
),
73+
$highlighter->getTheme() instanceof TerminalTheme ? ' ' : '',
7374
$line,
7475
);
7576
}

0 commit comments

Comments
 (0)