From 5249b5cd6eb102c842034c58152e409706065c8b Mon Sep 17 00:00:00 2001 From: r888888888 Date: Mon, 6 Jun 2016 17:37:44 -0700 Subject: [PATCH] fixes #2601: custom Css, do not add "important;" to lines starting with @ --- Capfile | 2 +- app/views/users/custom_style.css.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Capfile b/Capfile index 34274dea2..c2c5f1a21 100644 --- a/Capfile +++ b/Capfile @@ -13,4 +13,4 @@ require 'capistrano3/unicorn' # Load custom tasks from `lib/capistrano/tasks` if you have any defined Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } -after "deploy:published", "unicorn:restart" +after "deploy:published", "unicorn:reload" diff --git a/app/views/users/custom_style.css.erb b/app/views/users/custom_style.css.erb index bb59065fd..b074d59cd 100644 --- a/app/views/users/custom_style.css.erb +++ b/app/views/users/custom_style.css.erb @@ -1,4 +1,4 @@ -<% CurrentUser.user.custom_style.split.each do |line| %> +<% CurrentUser.user.custom_style.split(/\r\n|\r|\n/).each do |line| %> <% if line =~ /^@import/ %> <%= raw(line) %> <% else %>