Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ To use `helmfmt` as a pre-commit hook, add the following to your `.pre-commit-co
```yaml
repos:
- repo: https://github.com/digitalstudium/helmfmt
rev: v0.4.0
rev: v0.4.1
hooks:
- id: helmfmt
```
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0
0.4.1
2 changes: 1 addition & 1 deletion format.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
commentEndRe = regexp.MustCompile(`\*\/(?:}}|\s-}})`)

// Паттерны для определения типов токенов
varRe = regexp.MustCompile(`^\s*\$`)
varRe = regexp.MustCompile(`^\s*\$\w+\s*:=`)
controlRe = regexp.MustCompile(`^\s*(if|range|with|define|block)\b`)
elseRe = regexp.MustCompile(`^\s*else\b`)
endRe = regexp.MustCompile(`^\s*end\b`)
Expand Down
1 change: 1 addition & 0 deletions templates_test/templates/control_with_comment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.enabled }}
{{/* This is a comment */}}
{{- $var := .Values.someValue }}
{{ $var.foo | toYaml | indent 8 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.enabled }}
{{/* This is a comment */}}
{{- $var := .Values.someValue }}
{{ $var.foo | toYaml | indent 8 }}
{{- end }}