mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Completely ignore stray $ in input
Previously, "a $ string $var" would not have gotten replaced at all.
This commit is contained in:
@@ -133,7 +133,7 @@ def _varFind(text, vars, depth=0):
|
|||||||
if text[var_end] != '}' or brace_level != 0:
|
if text[var_end] != '}' or brace_level != 0:
|
||||||
return None
|
return None
|
||||||
if var_end == part_start[0]:
|
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)
|
space = _varFindLimitSpace(vars, space, text[part_start[0]:var_end], depth)
|
||||||
return {'replacement': space, 'start': start, 'end': end}
|
return {'replacement': space, 'start': start, 'end': end}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user