Skip to content

Commit e8a696b

Browse files
committed
add: allow context-value to take immeditate values which will not be looked up in the context but returned directly
1 parent 08720a4 commit e8a696b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

htmlgenerator/lazy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def __init__(self, value: str):
8383
self.value = value
8484

8585
def resolve(self, context: dict) -> typing.Any:
86-
return resolve_lookup(context, self.value)
86+
if isinstance(self.value, str):
87+
return resolve_lookup(context, self.value)
88+
return self.value
8789

8890

8991
class ContextFunction(Lazy):

0 commit comments

Comments
 (0)