indentation + detect asset urls in a css file even if one long line (case: css generated by sass)
This commit is contained in:
parent
ea050afd5e
commit
e429fbf7ca
@ -132,7 +132,7 @@ class ThemeAsset
|
||||
def escape_shortcut_urls(text)
|
||||
return if text.blank?
|
||||
|
||||
text.gsub(/[("'](\/(stylesheets|javascripts|images|medias)\/((.+)\/)*([a-z_\-0-9]+)\.[a-z]{2,3})[)"']/) do |path|
|
||||
text.gsub(/[("'](\/(stylesheets|javascripts|images|medias)\/(([^;.]+)\/)*([a-z_\-0-9]+)\.[a-z]{2,3})[)"']/) do |path|
|
||||
|
||||
sanitized_path = path.gsub(/[("')]/, '').gsub(/^\//, '')
|
||||
|
||||
|
@ -5,7 +5,7 @@ module Locomotive
|
||||
|
||||
# Write the link to a stylesheet resource
|
||||
# input: url of the css file
|
||||
def stylesheet_tag(input,media = 'screen')
|
||||
def stylesheet_tag(input, media = 'screen')
|
||||
return '' if input.nil?
|
||||
|
||||
unless input =~ /^(\/|http:)/
|
||||
|
Loading…
Reference in New Issue
Block a user