mirror of
https://github.com/tweag/nickel.git
synced 2024-09-20 16:08:14 +03:00
Fix substitution for interpolated expressions
This commit is contained in:
parent
7faabeceb3
commit
e6378deefc
10
src/eval.rs
10
src/eval.rs
@ -637,12 +637,10 @@ fn subst(rt: RichTerm, global_env: &Environment, env: &Environment) -> RichTerm
|
||||
.into_iter()
|
||||
.map(|chunk| match chunk {
|
||||
chunk @ StrChunk::Literal(_) => chunk,
|
||||
StrChunk::Expr(t) => StrChunk::Expr(subst_(
|
||||
t,
|
||||
global_env,
|
||||
env,
|
||||
Cow::Borrowed(bound.as_ref()),
|
||||
)),
|
||||
StrChunk::Expr(t, indent) => StrChunk::Expr(
|
||||
subst_(t, global_env, env, Cow::Borrowed(bound.as_ref())),
|
||||
indent,
|
||||
),
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user