indentation + detect asset urls in a css file even if one long line (case: css generated by sass)

This commit is contained in:
did 2011-04-30 01:58:15 +02:00
parent ea050afd5e
commit e429fbf7ca
2 changed files with 2 additions and 2 deletions

View File

@ -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(/^\//, '')

View File

@ -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:)/