fixes #2601: custom Css, do not add "important;" to lines starting with @
This commit is contained in:
@@ -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 %>
|
||||||
|
|||||||
Reference in New Issue
Block a user