fixes #2601: custom Css, do not add "important;" to lines starting with @

This commit is contained in:
r888888888
2016-06-01 13:25:22 -07:00
parent d2291fa754
commit ebbec0186c

View File

@@ -1 +1,7 @@
<%= CurrentUser.user.custom_style.gsub(/(\S)\s*(?:!important)?\s*(;|})/, "\\1!important\\2").html_safe %>
<% CurrentUser.user.custom_style.split.each do |line| %>
<% if line =~ /^@import/ %>
<%= raw(line) %>
<% else %>
<%= raw(line.gsub(/(\S)\s*(?:!important)?\s*(;|})/, "\\1 !important\\2")) %>
<% end %>
<% end %>