Fix pixfuture skyscraper

This commit is contained in:
2021-10-19 12:07:04 +02:00
parent fc8a9fe9d1
commit 21cd1ddd01
7 changed files with 55 additions and 23 deletions

View File

@@ -141,6 +141,8 @@ func (tm *TemplateManager) ParseTemplates(silent bool) {
"formatData": tm.formatData,
"formatSC": tm.formatSC,
"noescape": tm.noEscape,
"noescapeJS": tm.noEscapeJS,
"slashes": tm.slashes,
})
// Parse dynamic templates
@@ -296,9 +298,9 @@ func (tm *TemplateManager) formatSC(amt float64) string {
}
return fmtSize(amt/1e-24, "H")
}
func (tm *TemplateManager) noEscape(t string) template.HTML {
return template.HTML(t)
}
func (tm *TemplateManager) noEscape(t string) template.HTML { return template.HTML(t) }
func (tm *TemplateManager) noEscapeJS(t string) template.JS { return template.JS(t) }
func (tm *TemplateManager) slashes() template.HTML { return template.HTML("//") }
func detectInt(i interface{}) int {
switch v := i.(type) {