From 4c9ee769c5cee98ebc0dcef9395b524b84bedd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Sun, 7 Jun 2020 11:13:44 +0200 Subject: [PATCH] Clean: Add missing regex escapes #ignore --- Support/bin/clean.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Support/bin/clean.rb b/Support/bin/clean.rb index b6a34ecf..ac9ab953 100755 --- a/Support/bin/clean.rb +++ b/Support/bin/clean.rb @@ -156,7 +156,7 @@ class String # >> '${NAME/-/o/}'.replace_name('- - -') # => 'o\\ o\\ o' def replace_name(name, regex_escape_name = true) - gsub(%r{\${NAME(?:/([^/]+)/([^/]+)/)?}}).each do |_match| + gsub(%r{\$\{NAME(?:/([^/]+)/([^/]+)/)?\}}).each do |_match| pattern = Regexp.last_match(1) replacement = Regexp.last_match(2) name = name.gsub(pattern, replacement) if pattern && replacement