git-preview @ main

static git web frontend but with images and html previews + code truncation

fix line count for files that don't end in a newline

Signed-off-by: Derek Stevens <nilix@nilfm.cc>
Wed, 01 Feb 2023
1 files changed, 8 insertions(+), 0 deletions(-)
M routes/template.go

@@ -45,15 +45,23 @@ }

func countLines(r io.Reader) (int, error) { buf := make([]byte, 32*1024) + bufLen := 0 count := 0 nl := []byte{'\n'} for { c, err := r.Read(buf) + if c > 0 {

… preview truncated