Revert previous workaround in updatetx.rb

This commit is contained in:
Saivann 2014-11-06 12:07:12 -05:00
parent 1b6d736637
commit c2b0c6a146

View file

@ -28,7 +28,7 @@ dirs.each do |dir|
next if file == '.' or file == '..' next if file == '.' or file == '..'
contents = File.read(dir + '/' + file) contents = File.read(dir + '/' + file)
# Drop HTML code applied to current language only ( until next {% when / else / endcase %} statement ) # Drop HTML code applied to current language only ( until next {% when / else / endcase %} statement )
contents.gsub!(Regexp.new("{% when '" + lang + "' %}((?!{% endcase %})(?!.*?{% else %}).)*?{% when", Regexp::MULTILINE),'{% when') contents.gsub!(Regexp.new("{% when '" + lang + "' %}((?!{% endcase %})(?!{% else %}).)*?{% when", Regexp::MULTILINE),'{% when')
contents.gsub!(Regexp.new("{% when '" + lang + "' %}((?!{% endcase %}).)*?{% else %}", Regexp::MULTILINE),'{% else %}') contents.gsub!(Regexp.new("{% when '" + lang + "' %}((?!{% endcase %}).)*?{% else %}", Regexp::MULTILINE),'{% else %}')
contents.gsub!(Regexp.new("{% when '" + lang + "' %}.*?{% endcase %}", Regexp::MULTILINE),'{% endcase %}') contents.gsub!(Regexp.new("{% when '" + lang + "' %}.*?{% endcase %}", Regexp::MULTILINE),'{% endcase %}')
# Drop complete {% case / endcase %} statements when not used by any language anymore # Drop complete {% case / endcase %} statements when not used by any language anymore