aboutsummaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-07 00:04:48 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-07 00:04:48 -0400
commit3554c56b209a1544c69e189ddab3b19b4bf80ae6 (patch)
tree9d494e7b7ec4da3bad49c516b35e98a5829bb81c /src/parse.c
parent4afc7125ab42437e41508d9953a97333f6f87362 (diff)
Add easter egg: `~colorized`
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parse.c b/src/parse.c
index d142e780..fd37fec7 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1306,7 +1306,8 @@ PARSER(parse_text) {
bool allow_escapes = (open_quote != '`');
ast_list_t *chunks = _parse_text_helper(ctx, &pos, open_quote, close_quote, open_interp, allow_escapes);
- return NewAST(ctx->file, start, pos, TextJoin, .lang=lang, .children=chunks);
+ bool colorize = match(&pos, "~") && match_word(&pos, "colorized");
+ return NewAST(ctx->file, start, pos, TextJoin, .lang=lang, .children=chunks, .colorize=colorize);
}
PARSER(parse_path) {