Before: archlinuxaur-zzookeeper-HEAD After: archlinux-aur-z-zookeeper-HEAD
Signed-off-by: Cao Xueliang caoxl78320@163.com --- src/scheduler/pp_params.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scheduler/pp_params.cr b/src/scheduler/pp_params.cr index 28ec6ef..da8d8f3 100644 --- a/src/scheduler/pp_params.cr +++ b/src/scheduler/pp_params.cr @@ -51,8 +51,8 @@ class Job private def format_string(original_str) temp = [] of String original_str.each_char do |char| - if "#{char}" =~ /-|\w/ - temp << "#{char}" + if "#{char}" =~ /-|.|/|\w/ + temp << "#{char}".gsub("/", "-") end end
On Wed, Dec 02, 2020 at 10:33:39AM +0800, Cao Xueliang wrote:
Before: archlinuxaur-zzookeeper-HEAD After: archlinux-aur-z-zookeeper-HEAD
The content of the modification is not reflected.
Signed-off-by: Cao Xueliang caoxl78320@163.com
src/scheduler/pp_params.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scheduler/pp_params.cr b/src/scheduler/pp_params.cr index 28ec6ef..da8d8f3 100644 --- a/src/scheduler/pp_params.cr +++ b/src/scheduler/pp_params.cr @@ -51,8 +51,8 @@ class Job private def format_string(original_str) temp = [] of String original_str.each_char do |char|
if "#{char}" =~ /-|\w/
temp << "#{char}"
if "#{char}" =~ /-|\.|\/|\w/
temp << "#{char}".gsub("\/", "-")
"/" doesn't need to escape.
Why not replace the original_str directly? original_str.gsub('/', '-')
Thanks, RenWen
end end
-- 2.23.0
On Wed, Dec 02, 2020 at 01:03:21PM +0800, Ren Wen wrote:
On Wed, Dec 02, 2020 at 10:33:39AM +0800, Cao Xueliang wrote:
Before: archlinuxaur-zzookeeper-HEAD After: archlinux-aur-z-zookeeper-HEAD
The content of the modification is not reflected.
I just show the result, "archlinux/aur-z/zookeeper" is the original string.
Signed-off-by: Cao Xueliang caoxl78320@163.com
src/scheduler/pp_params.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scheduler/pp_params.cr b/src/scheduler/pp_params.cr index 28ec6ef..da8d8f3 100644 --- a/src/scheduler/pp_params.cr +++ b/src/scheduler/pp_params.cr @@ -51,8 +51,8 @@ class Job private def format_string(original_str) temp = [] of String original_str.each_char do |char|
if "#{char}" =~ /-|\w/
temp << "#{char}"
if "#{char}" =~ /-|\.|\/|\w/
temp << "#{char}".gsub("\/", "-")
"/" doesn't need to escape.
Why not replace the original_str directly? original_str.gsub('/', '-')
Good!
Thanks, Xueliang
Thanks, RenWen
end end
-- 2.23.0