@@ -67,6 +67,7 @@ def process_stylesheet_assets
67
67
log_processing name
68
68
# apply common conversions
69
69
file = convert_less ( file )
70
+ file = replace_all file , %r{/\* stylelint-disable.*?\* /\n *} , '' , optional : true
70
71
if name . start_with? ( 'mixins/' )
71
72
file = varargify_mixin_definitions ( file , *VARARG_MIXINS )
72
73
%w( responsive-(in)?visibility input-size text-emphasis-variant bg-variant ) . each do |mixin |
@@ -325,10 +326,10 @@ def replace_file_imports(less, target_path = '')
325
326
%Q(@import "#{ target_path } \\ 1";)
326
327
end
327
328
328
- def replace_all ( file , regex , replacement = nil , &block )
329
+ def replace_all ( file , regex , replacement = nil , optional : false , &block )
329
330
log_transform regex , replacement
330
331
new_file = file . gsub ( regex , replacement , &block )
331
- raise "replace_all #{ regex } , #{ replacement } NO MATCH" if file == new_file
332
+ raise "replace_all #{ regex } , #{ replacement } NO MATCH" if ! optional && file == new_file
332
333
new_file
333
334
end
334
335
@@ -465,7 +466,7 @@ def replace_mixins(less, mixin_names)
465
466
def replace_ms_filters ( file )
466
467
log_transform
467
468
file . gsub (
468
- /filter: e\( %\( "progid:DXImageTransform.Microsoft.gradient\( startColorstr='%d', endColorstr='%d', GradientType=(\d )\) ",argb\( ([\- $\w ]+)\) ,argb\( ([\- $\w ]+)\) \) \) ;/ ,
469
+ /filter: e\( %\( "progid:DXImageTransform.Microsoft.gradient\( startColorstr='%d', endColorstr='%d', GradientType=(\d )\) ", ? argb\( ([\- $\w ]+)\) , ? argb\( ([\- $\w ]+)\) \) \) ;/ ,
469
470
%Q(filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='\# {ie-hex-str(\\ 2)}', endColorstr='\# {ie-hex-str(\\ 3)}', GradientType=\\ 1);)
470
471
)
471
472
end
0 commit comments