allow for parameterized string functions
now also allow for ending parens from following, 1, 2, 4 and 5 match, rest are ignored. {doc | to_nice_json}} {{(doc | to_nice_json)}} {{doc | to_nice_json| from_json}} {{doc | to_nice_json()}} {{doc | to_nice_json(indent=2)}} {{doc | to_nice_json(indent=2) | from_json()}} {{doc | to_nice_json(indent=2) | from_json}} fixes #37579
This commit is contained in:
parent
0c2e7fd841
commit
5a333859fe
1 changed files with 2 additions and 1 deletions
|
@ -290,7 +290,8 @@ class Templar:
|
|||
self.environment.block_end_string,
|
||||
self.environment.variable_end_string
|
||||
))
|
||||
self._no_type_regex = re.compile(r'.*\|\s*(?:%s)\s*(?:%s)?$' % ('|'.join(C.STRING_TYPE_FILTERS), self.environment.variable_end_string))
|
||||
self._no_type_regex = re.compile(r'.*?\|\s*(?:%s)(?:\([^\|]*\))?\s*\)?\s*(?:%s)' %
|
||||
('|'.join(C.STRING_TYPE_FILTERS), self.environment.variable_end_string))
|
||||
|
||||
def _get_filters(self, builtin_filters):
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue