package server import ( "fmt" "strings" ) func (s *Server) expandMacros( body string, currentPath string, ) string { if strings.Contains( body, "{{children}}", ) { children, err := s.store.ListChildPaths( currentPath, ) if err == nil { var b strings.Builder b.WriteString( `
`, ) b.WriteString("") b.WriteString("
") body = strings.ReplaceAll( body, "{{children}}", b.String(), ) } } return body }