diff --git a/plugin/converter/template.go b/plugin/converter/template.go index 5840e9c41..aa72a82d6 100644 --- a/plugin/converter/template.go +++ b/plugin/converter/template.go @@ -36,7 +36,7 @@ import ( var ( // templateFileRE regex to verifying kind is template. - templateFileRE = regexp.MustCompile("^kind:\\s+template+\\n") + templateFileRE = regexp.MustCompilePOSIX("^kind:[[:space:]]+template[[:space:]]?+$") errTemplateNotFound = errors.New("template converter: template name given not found") errTemplateSyntaxErrors = errors.New("template converter: there is a problem with the yaml file provided") errTemplateExtensionInvalid = errors.New("template extension invalid. must be yaml, starlark or jsonnet") diff --git a/plugin/converter/testdata/starlark.template.yml b/plugin/converter/testdata/starlark.template.yml index 2f516fd7f..d11f5b3a3 100644 --- a/plugin/converter/testdata/starlark.template.yml +++ b/plugin/converter/testdata/starlark.template.yml @@ -1,3 +1,4 @@ +--- kind: template load: plugin.starlark data: