From 8353e43e30abb1cd54485c85434c54866580e66d Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 27 Aug 2020 15:03:32 +0300 Subject: [PATCH] Fix using variables in the middle of template strings --- reactbot/template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactbot/template.py b/reactbot/template.py index a581bf8..09967b9 100644 --- a/reactbot/template.py +++ b/reactbot/template.py @@ -53,11 +53,11 @@ class Template: self._map_variable_locations((*path, i), v) elif isinstance(data, dict): for k, v in data.items(): - if variable_regex.match(k): + if variable_regex.search(k): self._variable_locations.append((*path, Key(k))) self._map_variable_locations((*path, k), v) elif isinstance(data, str): - if variable_regex.match(data): + if variable_regex.search(data): self._variable_locations.append(path) @classmethod