diff --git a/announcement.gemspec b/announcement.gemspec index 8e72363..6d488c1 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -45,7 +45,7 @@ if bundle_update_flag i = texts.rindex(s1[-1]) texts[i] = "" end - regex_pattern = /(?=^)[ \t\r\n]*.response-content {\n justify-self: auto;\n}[\r\n]*|(?=^)[ \t\r\n]*.response-content {\n position: static;\n}[\r\n]*|(?=^)[ \t\r\n]*.response-content {\n position: relative;\n}[\r\n]*/m #|.response-content[^{]*{[^}]*@media[^{]*{[^{]*}[^{]*@media[^{]*{[^{]*}[^}]*}[^}]*} + regex_pattern = /((?=^)[ \t\r\n]*)*\.response-content {\n justify-self: auto;\n}[\r\n]*|((?=^)[ \t\r\n]*)*\.response-content {\n position: static;\n}[\r\n]*|((?=^)[ \t\r\n]*)*\.response-content {\n position: relative;\n}[\r\n]*/m #|((?=^)[ \t\r\n]*)*\.response-content[^{]*{[^}]*@media[^{]*{[^{]*}[^{]*@media[^{]*{[^{]*}[^}]*}[^}]*} if !texts.include? "$font-h1:" texts = "$font-h1: 1.5rem;\n$font-h2: 1.35rem;\n$font-h3: 1.2rem;\n$font-h4: 1.1rem;\n$font-h5: 1rem;\n$font-h6: 0.9rem;\n\n" + texts end @@ -78,7 +78,7 @@ if bundle_update_flag File.open(folder+'assets/stylesheets/template/base/_autobackup.bak', 'a') do |file| file.puts auto_save_text end - texts = texts.gsub(regex_pattern,"\n") + texts = texts.gsub(regex_pattern,"") File.open(filename, 'w') do |file| file.write (texts) end