From 3554c56b209a1544c69e189ddab3b19b4bf80ae6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 7 Apr 2025 00:04:48 -0400 Subject: Add easter egg: `~colorized` --- src/compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compile.c') diff --git a/src/compile.c b/src/compile.c index 6cb25de0..40d9ed4e 100644 --- a/src/compile.c +++ b/src/compile.c @@ -2775,6 +2775,7 @@ CORD compile(env_t *env, ast_t *ast) } case TextJoin: { const char *lang = Match(ast, TextJoin)->lang; + const char *colorize = Match(ast, TextJoin)->colorize ? "yes" : "no"; type_t *text_t = lang ? Table$str_get(*env->types, lang) : TEXT_TYPE; if (!text_t || text_t->tag != TextType) @@ -2811,7 +2812,7 @@ CORD compile(env_t *env, ast_t *ast) if (chunk_t->tag == TextType) chunk_code = compile(env, chunk->ast); else - chunk_code = compile_string(env, chunk->ast, "no"); + chunk_code = compile_string(env, chunk->ast, colorize); } else { code_err(chunk->ast, "I don't know how to convert ", type_to_str(chunk_t), " to ", type_to_str(text_t)); } -- cgit v1.2.3