Skip to content

Commit e2bd89e

Browse files
authored
Add in colons to sub regex for pseudo params (#2812)
1 parent 86c818d commit e2bd89e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cfnlint/template/transforms/_language_extensions.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,13 @@ def _walk(self, item: Any, params: MutableMapping[str, Any], cfn: Any):
161161
def _replace_string_params(
162162
self, s: str, params: Mapping[str, Any]
163163
) -> Tuple[bool, str]:
164-
if not re.search(r"\${[a-zA-Z0-9]+}", s):
164+
pattern = r"\${[a-zA-Z0-9:]+}"
165+
if not re.search(pattern, s):
165166
return (True, s)
166167
for k, v in params.items():
167168
s = re.sub(rf"\${{{k}}}", v, s)
168169

169-
return (not (bool(re.search(r"\${[a-zA-Z0-9]+}", s))), s)
170+
return (not (bool(re.search(pattern, s))), s)
170171

171172

172173
class _ForEachValue:

0 commit comments

Comments
 (0)