From 72d29bdc9754fa44b133416cb0522f196f8378b4 Mon Sep 17 00:00:00 2001 From: shubhindia Date: Tue, 17 Oct 2023 13:51:02 +0530 Subject: [PATCH] optimise the regex a bit Signed-off-by: shubhindia --- pkg/transformer/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/transformer/utils.go b/pkg/transformer/utils.go index 04989f132..44340dbb8 100644 --- a/pkg/transformer/utils.go +++ b/pkg/transformer/utils.go @@ -294,7 +294,7 @@ func Print(name, path string, trailing string, data []byte, toStdout, generateJS file = filepath.Join(path, file) // simple hack to remove status from the output - re := regexp.MustCompile(`status:[\s\S]*?(?:---|$)`) + re := regexp.MustCompile(`(?s)status:.*`) data = re.ReplaceAll(data, nil) if err := os.WriteFile(file, data, 0644); err != nil {