- cleanup unmatched custom ph:s from pr template

This commit is contained in:
Malte Hallström
2022-08-16 16:05:39 +02:00
parent 117e48acf3
commit e8ee90b94f
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -379,7 +379,7 @@ function cleanupPrPlaceHolders(
let transformed = template
for (const [, phs] of placeholders) {
for (const ph of phs) {
transformed = transformed.replaceAll(new RegExp(`\\$\\{\\{${ph.name}\\[.+?\\]\\}\\}`, 'gu'), '')
transformed = transformed.replaceAll(new RegExp(`\\$\\{\\{${ph.name}(?:\\[.+?\\])?\\}\\}`, 'gu'), '')
}
}
return transformed