aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2022-05-12 12:11:28 -0400
committerBruce Hill <bruce@bruce-hill.com>2022-05-12 12:11:28 -0400
commit56da250d69615d70774dbc361fa2693cca1e3df4 (patch)
treedbdeb2be018c5f10c13f721965b3bebff2283e88 /match.c
parente484a888151460ffc25a8478d9a9c9836652a35c (diff)
Split backref/named captures into separate concepts for performance
reasons.
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index 474bd85..a9f78ec 100644
--- a/match.c
+++ b/match.c
@@ -562,7 +562,7 @@ static match_t *match(match_ctx_t *ctx, const char *str, pat_t *pat)
match_t *m2;
// Push backrefs and run matching, then cleanup
- if (m1->pat->type == BP_CAPTURE && m1->pat->args.capture.name) {
+ if (m1->pat->type == BP_CAPTURE && m1->pat->args.capture.name && m1->pat->args.capture.backreffable) {
// Temporarily add a rule that the backref name matches the
// exact string of the original match (no replacements)
pat_t *backref;