From 14b04f97be197940eb6244f17deda5c344176c91 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 16 Sep 2024 00:29:12 -0400 Subject: Quote Patterns with "|" instead of "/" when applicable --- stdlib/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib') diff --git a/stdlib/text.c b/stdlib/text.c index fd54204b..2da8628c 100644 --- a/stdlib/text.c +++ b/stdlib/text.c @@ -1108,7 +1108,7 @@ public Text_t Text$as_text(const void *text, bool colorize, const TypeInfo *info if (!text) return info && info->TextInfo.lang ? Text$from_str(info->TextInfo.lang) : Text("Text"); char quote_char; if (info == &Pattern$info) { - quote_char = '/'; + quote_char = Text$has(*(Text_t*)text, Pattern("/")) && !Text$has(*(Text_t*)text, Pattern("|")) ? '|' : '/'; } else { // Figure out the best quotation mark to use: bool has_dollar = false, has_double_quote = false, has_backtick = false, -- cgit v1.2.3