Skip to content

Commit

Permalink
fix: use backticks for templates (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f authored Jan 19, 2025
1 parent b4e9864 commit fe2de71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/engine/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ func (*Command) executeTemplate(templateContent string, data map[string]any) str
},
}

templateContent = strings.ReplaceAll(templateContent, "”", "`")
tmpl, err := template.New("template").Funcs(funcMap).Parse(templateContent)
if err != nil {
log.Error("unable to parse template", "error", err)
Expand Down Expand Up @@ -230,7 +231,7 @@ func (cmd *Command) RenderHelpTemplate() CommandResult {
**Available subcommands:**
{{- range .cmd.SubCommands }}
<pre>{{.Name | fixed 15 }}</pre> {{.Emoji}} {{.Help}}
{{.Name | fixed 15 }} {{.Emoji}} {{.Help}}
{{- end}}
Use "{{.cmd.Name}} help --subcommand=[subcommand]" for more information about a subcommand.
Expand Down Expand Up @@ -280,7 +281,7 @@ func (cmd *Command) AddHelpSubCommand() {

func (cmd *Command) AddAboutSubCommand() {
const aboutTemplate = `
## About Pagu
**About Pagu**
Version : {{.version}}
`
Expand Down

0 comments on commit fe2de71

Please sign in to comment.