diff --git a/distribusi.go b/distribusi.go index 47510de..964486d 100644 --- a/distribusi.go +++ b/distribusi.go @@ -638,16 +638,21 @@ func mkDiv(c *cli.Context, mtype string, href, fname string, unknown bool) (stri ftype, _ := parseMtype(mtype) if ftype == "text" { - div = fmt.Sprintf("
%s%s
", fname, ftype, href, filename) + divTag := "
%s%s
" + div = fmt.Sprintf(divTag, fname, ftype, href, filename) } else if ftype == "os" { - div = fmt.Sprintf("
%s
", fname, ftype, href) + divTag := "
%s
" + div = fmt.Sprintf(divTag, fname, ftype, href) } else { if unknown { - // we really don't know what this is, so the filename is the href and we avoid adding it again - div = fmt.Sprintf("
%s
", fname, ftype, href) + // we really don't know what this is, so the filename is the href and we + // avoid adding it again + divTag := "
%s
" + div = fmt.Sprintf(divTag, fname, ftype, href) } else { // images, videos, etc. still get a filename - div = fmt.Sprintf("
%s%s
", fname, ftype, href, filename) + divTag := "
%s%s
" + div = fmt.Sprintf(divTag, fname, ftype, href, filename) } }