mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [convert] Silence warnings during actual conversion.
This commit is contained in:
parent
8ffb7ab73e
commit
1d51bb997e
1 changed files with 10 additions and 8 deletions
|
@ -631,15 +631,17 @@ END
|
||||||
@options[:for_engine][:syntax] = @options[:from]
|
@options[:for_engine][:syntax] = @options[:from]
|
||||||
|
|
||||||
out =
|
out =
|
||||||
if @options[:from] == :css
|
::Haml::Util.silence_haml_warnings do
|
||||||
require 'sass/css'
|
if @options[:from] == :css
|
||||||
::Sass::CSS.new(input.read, @options[:for_tree]).render(@options[:to])
|
require 'sass/css'
|
||||||
else
|
::Sass::CSS.new(input.read, @options[:for_tree]).render(@options[:to])
|
||||||
if input.is_a?(File)
|
|
||||||
::Sass::Files.tree_for(input.path, @options[:for_engine])
|
|
||||||
else
|
else
|
||||||
::Sass::Engine.new(input.read, @options[:for_engine]).to_tree
|
if input.is_a?(File)
|
||||||
end.send("to_#{@options[:to]}", @options[:for_tree])
|
::Sass::Files.tree_for(input.path, @options[:for_engine])
|
||||||
|
else
|
||||||
|
::Sass::Engine.new(input.read, @options[:for_engine]).to_tree
|
||||||
|
end.send("to_#{@options[:to]}", @options[:for_tree])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
output = File.open(input.path, 'w') if @options[:in_place]
|
output = File.open(input.path, 'w') if @options[:in_place]
|
||||||
|
|
Loading…
Add table
Reference in a new issue