From 6588a4588061e19c3c8e7760c18b046b5f4fd0f3 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Thu, 23 Aug 2018 15:09:20 +0200 Subject: [PATCH] Make Rubocop happy --- lib/tasks/posts.rake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/tasks/posts.rake b/lib/tasks/posts.rake index bb5c116b1eb..d28dc665625 100644 --- a/lib/tasks/posts.rake +++ b/lib/tasks/posts.rake @@ -138,10 +138,13 @@ def remap_posts(find, type, ignore_case, replace = "") i = 0 Post.raw_match(find, type).find_each do |p| - regex = case type - when 'string' then Regexp.new(Regexp.escape(find), ignore_case) - when 'regex' then Regexp.new(find, ignore_case) - end + regex = + case type + when 'string' then + Regexp.new(Regexp.escape(find), ignore_case) + when 'regex' then + Regexp.new(find, ignore_case) + end new_raw = p.raw.gsub(regex, replace)