fix error

This commit is contained in:
chiu 2020-05-06 13:54:09 +08:00
parent 8ae48585ed
commit d81e9d40bd
1 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,7 @@ all_template.each do |folder|
i = texts.rindex(s1[-1])
texts[i] = ""
end
regex_pattern = /.response-content {\n justify-self: auto;\n}|.response-content {\n position: static;\n}|.response-content {\n position: relative;\n}|.response-content[^{]*{[^}]*@media[^{]*{[^{]*}[^{]*@media[^{]*{[^{]*}[^}]*}[^}]*}/m
regex_pattern = /.response-content {\n justify-self: auto;\n}|.response-content {\n position: static;\n}|.response-content {\n position: relative;\n}/m #|.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
@ -77,8 +77,9 @@ all_template.each do |folder|
check_texts.each do |check_text|
if !texts.include?(check_text)
puts "editing #{folder}assets/stylesheets/template/base/_variables.scss"
texts = texts + check_text
File.open(filename, 'w') do |file|
file.write(texts + check_text)
file.write(texts)
end
end
end