From 7d5248e2ee56d26431467ae2134981c63677b12a Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Fri, 24 Oct 2025 19:12:43 -0700 Subject: [PATCH] fix(context): skip over empty keys to avoid replacing $ and breaking other values --- src/context.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/context.rs b/src/context.rs index fbcbc80..71fedbb 100644 --- a/src/context.rs +++ b/src/context.rs @@ -201,6 +201,10 @@ impl SproutContext { let mut result = text.as_ref().to_string(); let mut did_change = false; for (key, value) in values { + // Empty keys are not supported. + if key.is_empty() { + continue; + } let next_result = result.replace(&format!("${key}"), value); if result != next_result { did_change = true;