changeset 13880:9e36180e1528

util.xtemplate: Fix wrongful teal warning It claims the value is a stanza but it's in a `is string` block? Reported as https://github.com/teal-language/tl/issues/994
author Kim Alvefur <zash@zash.se>
date Fri, 09 May 2025 00:31:38 +0200
parents 88a5cb5a1ab5
children f138b8a75468
files teal-src/prosody/util/xtemplate.tl
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/teal-src/prosody/util/xtemplate.tl	Fri May 09 00:47:19 2025 +0200
+++ b/teal-src/prosody/util/xtemplate.tl	Fri May 09 00:31:38 2025 +0200
@@ -94,7 +94,7 @@
 
 		if value is string then
 			if not is_escaped then value = escape(value); end
-			return pre_blank .. value .. post_blank
+			return pre_blank .. (value as string) .. post_blank
 		elseif st.is_stanza(value) then
 			value = value:get_text();
 			if value then