Allow the codelines shortcode to use hl_lines.

This commit is contained in:
Danila Fedorin 2020-08-12 01:37:55 -07:00
parent b219f6855e
commit eff0de5330

View File

@ -6,4 +6,9 @@
{{ .Scratch.Set "u" $t }} {{ .Scratch.Set "u" $t }}
{{ end }} {{ end }}
{{ $v := first (add (sub (int (.Get 3)) (int (.Get 2))) 1) (.Scratch.Get "u") }} {{ $v := first (add (sub (int (.Get 3)) (int (.Get 2))) 1) (.Scratch.Get "u") }}
{{ highlight (delimit $v "\n") (.Get 0) (printf "linenos=table,linenostart=%d" (.Get 2)) }} {{ if (.Get 4) }}
{{ .Scratch.Set "opts" (printf ",%s" (.Get 4)) }}
{{ else }}
{{ .Scratch.Set "opts" "" }}
{{ end }}
{{ highlight (delimit $v "\n") (.Get 0) (printf "linenos=table,linenostart=%d%s" (.Get 2) (.Scratch.Get "opts")) }}