Skip to content

Commit

Permalink
forbid usage of capture groups in list patterns with programs
Browse files Browse the repository at this point in the history
  • Loading branch information
isamert committed Jun 4, 2019
1 parent eb8ccae commit cc837c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaro
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@
(set! str (substring-replace str "%F" (escape (path->abs file))))
(set! str (substring-replace str "%u" (escape (path->uri file))))
;; Replace capture groups with %0 %1 %2...
(set! pattern (pattern-exec pattern file))
(when pattern
(when (and pattern (not (list? pattern)))
(set! pattern (pattern-exec pattern file))
(for-each
(λ (i) (let ((captured (match:substring pattern i)))
(when captured
Expand Down

0 comments on commit cc837c9

Please sign in to comment.