fix(code): fix line number styling for better visibility

This commit is contained in:
Cell
2026-05-17 23:43:36 +08:00
parent a4fcc5ed59
commit 78778dad08
2 changed files with 13 additions and 3 deletions
@@ -19,7 +19,7 @@
{{- $lines := cond .Inner (len (split .Inner "\n")) 0 -}}
{{- $maxShownLines := $config.maxshownlines -}}
{{- $lineNoStart := cond (ne .Options.linenostart nil) .Options.linenostart 1 -}}
{{- $lineNosDigit := strings.RuneCount (add $lines $lineNoStart) -}}
{{- $lineNosDigit := strings.RuneCount (sub (add $lines $lineNoStart) 1) -}}
{{- $class := "highlight" -}}
{{- with $config.class -}}{{ $class = add $class " " . }}{{- end -}}
{{- $targetClass := add "code-block " $class -}}