File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -789,7 +789,7 @@ func (t *TemplateResolver) processForDataTypes(str string) string {
789
789
d1 := regexp .QuoteMeta (t .config .StartDelim )
790
790
d2 := regexp .QuoteMeta (t .config .StopDelim )
791
791
//nolint: lll
792
- expression := `:\s+(?:[\|>]-?\s+)?(?:'?\s*)(` + d1 + `(?:.*\|\s*(?:toInt|toBool|toLiteral)|(?:.*(?:copyConfigMapData|copySecretData))).*` + d2 + `)(?:\s*'?)`
792
+ expression := `:\s+(?:[\|>]-?\s+)?(?:'?\s*)(` + d1 + `-? (?:.*\|\s*(?:toInt|toBool|toLiteral)|(?:.*(?:copyConfigMapData|copySecretData))).*` + d2 + `)(?:\s*'?)`
793
793
re := regexp .MustCompile (expression )
794
794
klog .V (2 ).Infof ("\n Pattern: %v\n " , re .String ())
795
795
@@ -815,7 +815,7 @@ func (t *TemplateResolver) processForAutoIndent(str string) string {
815
815
// This is not a very strict regex as occasionally, a user will make a mistake such as
816
816
// `config: '{{ "hello\nworld" | autoindent }}'`. In that event, `autoindent` will change to
817
817
// `indent 1`, but `indent` properly handles this.
818
- re := regexp .MustCompile (`( *)(?:'|")?(` + d1 + `.*\| *autoindent *` + d2 + `)` )
818
+ re := regexp .MustCompile (`( *)(?:'|")?(` + d1 + `.*\| *autoindent *-? ` + d2 + `)` )
819
819
klog .V (2 ).Infof ("\n Pattern: %v\n " , re .String ())
820
820
821
821
submatches := re .FindAllStringSubmatch (str , - 1 )
You can’t perform that action at this time.
0 commit comments