1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Completely ignore stray $ in input

Previously, "a $ string $var" would not have gotten replaced at all.
This commit is contained in:
Daniel Hokka Zakrisson 2012-11-13 00:08:33 +01:00
parent 24b536d7ed
commit a2bb3a09d2

View file

@ -133,7 +133,7 @@ def _varFind(text, vars, depth=0):
if text[var_end] != '}' or brace_level != 0:
return None
if var_end == part_start[0]:
return None
return {'replacement': '$', 'start': start, 'end': end}
space = _varFindLimitSpace(vars, space, text[part_start[0]:var_end], depth)
return {'replacement': space, 'start': start, 'end': end}