From 8cb9be63038a561e2cd1f58dab17a1aa0879d6c2 Mon Sep 17 00:00:00 2001 From: Bohung Date: Thu, 16 Dec 2021 11:23:46 +0800 Subject: [PATCH] Fix bug. --- patchfile.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchfile.gemspec b/patchfile.gemspec index a8e6545..13b8e01 100644 --- a/patchfile.gemspec +++ b/patchfile.gemspec @@ -51,7 +51,7 @@ all_template.each do |folder| texts = File.read(filename).force_encoding('UTF-8') new_texts = texts.gsub(/<.*javascript_include_tag.*bootstrap.*>/,"<%= javascript_include_tag \"bootstrap.min\"%>") bootstrap_count = 0 - new_texts.gsub("<%= javascript_include_tag \"bootstrap.min\"%>"){|t| + new_texts = new_texts.gsub("<%= javascript_include_tag \"bootstrap.min\"%>"){|t| bootstrap_count += 1 (bootstrap_count > 1) ? "" : t }