|
@ -607,13 +607,15 @@ func mkHref(c *cli.Context, fpath string, mtype string) (bool, string, error) { |
|
|
return unknown, href, err |
|
|
return unknown, href, err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
trimmed := trimFinalNewline(fcontents) |
|
|
|
|
|
|
|
|
if stype == "html" { |
|
|
if stype == "html" { |
|
|
hrefTemplate = htmlTags[ftype][stype] |
|
|
hrefTemplate = htmlTags[ftype][stype] |
|
|
href = fmt.Sprintf(hrefTemplate, fname, trimFinalNewline(fcontents)) |
|
|
href = fmt.Sprintf(hrefTemplate, fname, trimmed) |
|
|
strippedDebugOutput = fmt.Sprintf(hrefTemplate, fname, logStripMsg) |
|
|
strippedDebugOutput = fmt.Sprintf(hrefTemplate, fname, logStripMsg) |
|
|
} else { |
|
|
} else { |
|
|
hrefTemplate = htmlTags[ftype]["generic"] |
|
|
hrefTemplate = htmlTags[ftype]["generic"] |
|
|
href = fmt.Sprintf(hrefTemplate, trimFinalNewline(fcontents)) |
|
|
href = fmt.Sprintf(hrefTemplate, trimmed) |
|
|
strippedDebugOutput = fmt.Sprintf(hrefTemplate, logStripMsg) |
|
|
strippedDebugOutput = fmt.Sprintf(hrefTemplate, logStripMsg) |
|
|
} |
|
|
} |
|
|
} else if ftype == "image" { |
|
|
} else if ftype == "image" { |
|
|