vanilla-hugo/layouts/partials/linerangestr.html

10 lines
273 B
HTML
Raw Permalink Normal View History

{{ if eq .from .to }}
{{ .scratch.Set "comment" (printf ", line %d" .from) }}
{{ else }}
{{ if eq .from 0 }}
{{ .scratch.Set "comment" (printf ", around line %d" .to) }}
{{ else }}
{{ .scratch.Set "comment" (printf ", lines %d through %d" .from .to) }}
{{ end }}
{{ end }}