Skip to content

Clarification on functions as context #166

Answered by jgonggrijp
thegrandpoobah asked this question in Q&A
Discussion options

You must be logged in to vote

You interpreted the spec correctly, at least in the sense that the returned value is used for interpolation. That template, given those data, will render `` (the empty string) rather than null, because of this spec:

- name: Basic Null Interpolation
desc: Nulls should interpolate as the empty string.
data: { cannot: null }
template: "I ({{cannot}}) be seen!"
expected: "I () be seen!"

What do you mean by "sub-optimal"? What would be more optimal in your opinion?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jgonggrijp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #39 on November 09, 2023 00:47.