aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-16 19:39:23 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-16 19:39:23 -0700
commit1dd89c766a3d89fde1c84813c04061f5465c234c (patch)
treefb1bd5b357390355849a5d35137cf01b59889d5f
parentd94dccb7951004bc2f5df7aea4962675ce3b1783 (diff)
In verbose mode, print lowercase captures too
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index a245efb..79d8b1c 100644
--- a/vm.c
+++ b/vm.c
@@ -556,7 +556,7 @@ void print_match(match_t *m, const char *color, int verbose)
}
} else {
const char *name = m->name_or_replacement;
- if (verbose && m->is_ref && name && isupper(name[0]))
+ if (verbose && m->is_ref && name)
printf(color ? "\033[0;2;35m{%s:" : "{%s", name);
//if (m->is_capture && name)
// printf("\033[0;2;33m[%s:", name);
@@ -573,7 +573,7 @@ void print_match(match_t *m, const char *color, int verbose)
}
if (m->end > prev)
printf("%s%.*s", color ? color : "", (int)(m->end - prev), prev);
- if (verbose && m->is_ref && name && isupper(name[0]))
+ if (verbose && m->is_ref && name)
printf(color ? "\033[0;2;35m}" : "}");
//if (m->is_capture && name)
// printf("\033[0;2;33m]");