Skip to content

fix(pipeline): end variable substitution matching on first closing brace

Michael requested to merge fix/var-referencing-colon into main

This fixes the parsing when you have a colon in between two referenced variables that do not reference a other component.

> const OLD = /\$\{(([^:]+):)?([^}]+)}/gm
> "${x}:${y}".match(OLD)
[ '${x}:${y}' ]           // <- bug
> const NEW = /\$\{(([^:}]+):)?([^}]+)}/gm
> "${x}:${y}".match(NEW)
[ '${x}', '${y}' ]
> "${a:x}:${b:y}".match(NEW)
[ '${a:x}', '${b:y}' ]

Merge request reports