doc/template: add docs for template helpers

This commit is contained in:
Ariel Mashraki
2021-07-19 20:38:42 +03:00
committed by Ariel Mashraki
parent 81eeefa6a2
commit 6ff6e81652
2 changed files with 47 additions and 1 deletions

View File

@@ -617,7 +617,7 @@ func (g *Graph) templates() (*Template, []GraphTemplate) {
name := tmpl.Name()
switch {
// Helper templates can be either global (prefixed with "helper/"),
// or local, where their names follow the format: <root-tmpl>/helper/.+).
// or local, where their names follow the format: "<root-tmpl>/helper/.+").
case strings.HasPrefix(name, "helper/"):
case strings.Contains(name, "/helper/"):
helpers[name] = struct{}{}