diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-16 00:29:12 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-16 00:29:12 -0400 |
| commit | 14b04f97be197940eb6244f17deda5c344176c91 (patch) | |
| tree | ab171cd1ae0e37df6144c5bde0725dbc6eb3476c /stdlib/text.c | |
| parent | 10a51ad996482d07ecfe4bcd3251b4e8701a30df (diff) | |
Quote Patterns with "|" instead of "/" when applicable
Diffstat (limited to 'stdlib/text.c')
| -rw-r--r-- | stdlib/text.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |
