fix adding custom functions
This commit is contained in:
parent
d44e2fcd5f
commit
cda9fc73ac
2 changed files with 6 additions and 2 deletions
|
|
@ -477,7 +477,7 @@ class Script:
|
|||
added_variables_to_validate.add(name)
|
||||
|
||||
if name in functions_to_add:
|
||||
self._functions[_function_name(name)] = parsed
|
||||
self._functions[name] = parsed
|
||||
else:
|
||||
self._variables[name] = parsed
|
||||
|
||||
|
|
|
|||
|
|
@ -80,4 +80,8 @@ class TestScript:
|
|||
}
|
||||
)
|
||||
|
||||
assert script.resolve_once({"url": "{ %bilateral_url('nope') }"})["url"].native == "nope"
|
||||
script.add({"%bilateral_url_wrap": "{ %bilateral_url($0) }"})
|
||||
|
||||
assert (
|
||||
script.resolve_once({"url": "{ %bilateral_url_wrap('nope') }"})["url"].native == "nope"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue