Skip to content

Formatting issues with comment syntax and spaces in chezmoi templates #4217

Closed Answered by halostatue
jbwfu asked this question in Q&A
Discussion options

You must be logged in to vote

This is more of a go text/template question than a chezmoi question, but comments may only be either {{/* | */}} or {{- /* | */ -}}. You can have the whitespace removal on either end without requiring a match on both sides. So the following four combinations are permitted:

{{/* */}}
{{- /* */}}
{{/* */ -}}
{{- /* */ -}}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by halostatue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants