From 5a2b34e159f41bdb99e0da1f1038556b80fd7d14 Mon Sep 17 00:00:00 2001 From: Colin Hoglund Date: Wed, 15 Jun 2016 14:17:17 -0400 Subject: [PATCH] allow spaces before the filter string (#16312) --- lib/ansible/template/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index 4e1f7b7fd8b..73fe50fe8ac 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -173,7 +173,7 @@ class Templar: self.variable_start = self.environment.variable_start_string self.variable_end = self.environment.variable_end_string self._clean_regex = re.compile(r'(?:%s|%s|%s|%s)' % (self.variable_start, self.block_start, self.block_end, self.variable_end)) - self._no_type_regex = re.compile(r'.*\|(?:%s)\s*(?:%s)?$' % ('|'.join(C.STRING_TYPE_FILTERS), self.variable_end)) + self._no_type_regex = re.compile(r'.*\|\s*(?:%s)\s*(?:%s)?$' % ('|'.join(C.STRING_TYPE_FILTERS), self.variable_end)) def _get_filters(self): '''